mdedetrich commented on PR #371: URL: https://github.com/apache/incubator-pekko/pull/371#issuecomment-1593607957
So I have just pushed the branch using the simple version of enhanced double hash with the `synchronized` keyword. Here are the benchmarks ``` [info] IdGeneratorBanchmark.measureEnhancedDoubleHash thrpt 3 0,377 ± 0,032 ops/ns [info] IdGeneratorBanchmark.measureSecureRandom thrpt 3 0,001 ± 0,001 ops/ns [info] IdGeneratorBanchmark.measureThreadLocalRandom thrpt 3 0,308 ± 0,057 ops/ns [info] IdGeneratorBanchmark.multipleThreadsMeasureEnhancedDoubleHash thrpt 3 0,025 ± 0,013 ops/ns [info] IdGeneratorBanchmark.multipleThreadsMeasureSecureRandom thrpt 3 0,001 ± 0,001 ops/ns [info] IdGeneratorBanchmark.multipleThreadsMeasureThreadLocalRandom thrpt 3 0,609 ± 0,014 ops/ns ``` Note that I have modified the benchmarks to be more indicative of what we are actually testing in reality, i.e. the original benchmarks designated 8 threads however its unlikely in reality that we will have more than 8 threads hitting the `nextId()` function at once with such high contention, so instead I set the default to just a single thread but added another set of benchmarks for multiple threads. @pjfanning @IainHull Let me know if I may have missed something -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
