neoremind commented on issue #1875: [CALCITE-3873] Use global caching for ReflectiveVisitDispatcher implementation URL: https://github.com/apache/calcite/pull/1875#issuecomment-604479873 @danny0405 jmh test result is as below. It shows by using reflection invocation to look up methods in every call, the overhead is not small compared with global caching. In real case, reflection invocation can happen between invocations and different `ReflectVisitorDispatcher` instance. The solution might be trivial, but I think it goes toward the right way. ``` Benchmark Mode Cnt Score Error Units ReflectVisitorDispatcherTest.testGlobalLevelCaching avgt 15 108.398 ± 15.280 ns/op ReflectVisitorDispatcherTest.testInstanceLevelCaching avgt 15 730.208 ± 117.693 ns/op ``` Test source code is attached in [JIRA](https://issues.apache.org/jira/secure/attachment/12997903/ReflectVisitorDispatcherTest.java), the full test report can be found [here](https://issues.apache.org/jira/secure/attachment/12997904/jmh_result.txt)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services