Hey!
Please have a look at the latest perf test results [1][2]:
Benchmark Mode Cnt Score Error Units
MyBenchmark.noVariable thrpt 20 681131269.875 ± 3961932.923 ops/s
MyBenchmark.withIsTraceEnabledCheck thrpt 20 676307984.921 ± 14305970.393 ops/s
MyBenchmark.withVariable thrpt 20 2411000894.582 ± 17382438.635 ops/s
I think there is no surprise here.. using a field, which stores the result of `logger.isTraceEnabled()` evaluation is 3 times faster than other options.
If anyone is interested in printing out JIT stuff, I also ran it with "-XX:+PrintCompilation", "-XX:+PrintCompilation2" and "-XX:+PrintInlining" here [3].
I'm not a performance expert but it seems that JIT could not inline the "translate" method because of its size (see line 1861). However it tried several times with different optimizations (and some of them were thrown away - "made not entrant" messages [4]).
Let's wait for James' opinion on this, but I think we should address this issue on JBoss Logging/LogManager side (so I agree with David here) and make those parts inlinable (wow, does this word even exist? :D). Once this is done, we could experiment further in Infinispan codebase and see how this relates to some real world benchmarks...
Thanks
Sebastian