You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "jhuynh1 (GitHub)" <gi...@apache.org> on 2019/02/22 22:56:35 UTC
[GitHub] [geode] jhuynh1 commented on issue #3196: GEODE-6404: work
around possible sync issue with computeIfAbsent
Using the added benchmark on my local mac I had the following results:
Java 1.8
Old way (straight computeIfAbsent)
ComputeIfAbsentBenchmark.monitorQuery thrpt 25 597,050.898 ± 23260.717 ops/s
ComputeIfAbsentBenchmark.monitorQuery thrpt 10 851,289.826 ± 27422.826 ops/s
New way (doing get)
ComputeIfAbsentBenchmark.monitorQuery thrpt 10 33,338,554.778 ± 2,533,816.655 ops/s
(Ran a few more times but forgot to log the results, they were consistent with being exponentially faster)
Java 11 (compiled against java 1.8)
Old way (straight computeIfAbsent)
ComputeIfAbsentBenchmark.monitorQuery thrpt 10 17,292,751.710 ± 1,975,003.721 ops/s
ComputeIfAbsentBenchmark.monitorQuery thrpt 10 19,575,401.472 ± 682464.230 ops/s
ComputeIfAbsentBenchmark.monitorQuery thrpt 10 20,644,562.716 ± 511267.928 ops/s
New way (doing get)
ComputeIfAbsentBenchmark.monitorQuery thrpt 10 32,063,248.194 ± 831,342.655 ops/s
ComputeIfAbsentBenchmark.monitorQuery thrpt 10 31,672,072.486 ± 1095001.901 ops/s
ComputeIfAbsentBenchmark.monitorQuery thrpt 10 32,283,562.515 ± 1837351.361 ops/s
It looks like jdk 11 has vastly improved computeIfAbsent but the retrieval of computeIfAbsent is slightly slower than the get still. I've removed the check for the jdk version for now based on these results...
[ Full content available at: https://github.com/apache/geode/pull/3196 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org