Closed otaviojava closed 10 years ago
Wow, great work!
BUT, PLEASE; PLEASE; PLEASE: execute the complete test suite on each module changed before do any checkins, especially such relatively large improvements:
I had to fixed quite a couple of things completely broken, see my checkin comments:
@atsticks Sorry. I will take care it in next actions Thank you for fix it
Treating null and not null using java.util.Objects will faster than using operator, because the JIT action. Running the bench with JMH[1] the result was:
Benchmark (size) Mode Samples Mean Mean error Units m.NullBenchmark.isNotNull 1000000 thrpt 20 251.020 36.826 ops/s m.NullBenchmark.isNotNullUtils 1000000 thrpt 20 286.275 2.388 ops/s m.NullBenchmark.isNull 1000000 thrpt 20 289.536 2.463 ops/s m.NullBenchmark.isNullUtils 1000000 thrpt 20 290.583 2.101 ops/s
Another points of null can replace with Optional or using new methods on map.
[1] http://openjdk.java.net/projects/code-tools/jmh/