qos-ch/slf4j — pull request #86 by karl82 (2014-10-18 17:57:37+00:00)
Title: Use ThreadLoca<DateFormat> in SimpleLogger

In ```SimpleLogger``` is used static ```DateFormatter``` guarded by itself. I thought it might be good to replace it with ```ThreadLocal```. I think it's faster by ~3-5%, but would be good if someone other can verify the results.

With LocalThread
Benchmark Mode Samples Score Error Units
o.s.i.SimpleLoggerBenchmark.eightThreads thrpt 20 291713.679 ± 2090.442 ops/s
o.s.i.SimpleLoggerBenchmark.fourThreads thrpt 20 291552.450 ± 1771.590 ops/s
o.s.i.SimpleLoggerBenchmark.oneThread thrpt 20 548539.921 ± 3197.140 ops/s
o.s.i.SimpleLoggerBenchmark.sixteenThreads thrpt 20 281860.846 ± 3172.071 ops/s
o.s.i.SimpleLoggerBenchmark.twoThreads thrpt 20 290422.132 ± 2213.392 ops/s

With synchronized block
Benchmark Mode Samples Score Error Units
o.s.i.SimpleLoggerBenchmark.eightThreads thrpt 20 251927.856 ± 4606.081 ops/s
o.s.i.SimpleLoggerBenchmark.fourThreads thrpt 20 289278.497 ± 1899.424 ops/s
o.s.i.SimpleLoggerBenchmark.oneThread thrpt 20 550569.540 ± 4470.577 ops/s
o.s.i.SimpleLoggerBenchmark.sixteenThreads thrpt 20 275318.387 ± 3156.346 ops/s
o.s.i.SimpleLoggerBenchmark.twoThreads thrpt 20 295816.125 ± 24218.907 ops/s

There are new unit tests using jmockit and jmh benchmarks in new module ```slf4j-perf```