https://issues.apache.org/jira/browse/TINKERPOP-2163
Every time I think there's nothing else to squeeze out of this class I find something new. This time I cached results of `Method.getParameters()` as well as varargs checks. The former offered the bigger benefit as calls to that method forced a `clone()` of the parameter array, but the latter also helped. Prior to the change on `tp33` we were getting: ```text Benchmark Mode Cnt Score Error Units JavaTranslatorBenchmark.testTranslationLong thrpt 20 25812.057 ± 504.233 ops/s JavaTranslatorBenchmark.testTranslationMedium thrpt 20 316019.034 ± 13852.097 ops/s JavaTranslatorBenchmark.testTranslationShort thrpt 20 1403109.145 ± 41460.176 ops/s JavaTranslatorBenchmark.testTranslationWithStrategy thrpt 20 49316.015 ± 1701.437 ops/s ``` and now, with this change, we're looking at: ```text Benchmark Mode Cnt Score Error Units JavaTranslatorBenchmark.testTranslationLong thrpt 20 30270.986 ± 553.973 ops/s JavaTranslatorBenchmark.testTranslationMedium thrpt 20 385286.380 ± 6572.709 ops/s JavaTranslatorBenchmark.testTranslationShort thrpt 20 1724457.005 ± 11173.083 ops/s JavaTranslatorBenchmark.testTranslationWithStrategy thrpt 20 60989.899 ± 533.268 ops/s ``` That's roughly 20% improvement. Not bad. All tests pass with `docker/build.sh -t -n -i` VOTE +1 [ Full content available at: https://github.com/apache/tinkerpop/pull/1062 ] This message was relayed via gitbox.apache.org for [email protected]
