mdedetrich commented on PR #371:
URL: https://github.com/apache/incubator-pekko/pull/371#issuecomment-1592134199

   So here are the results when using a simple faster version with the  
`synchronized` block
   
   ```
   [info] Benchmark                                        Mode  Cnt  Score    
Error   Units
   [info] IdGeneratorBanchmark.measureEnhancedDoubleHash  thrpt    3  0,009 ±  
0,012  ops/ns
   [info] IdGeneratorBanchmark.measureSecureRandom        thrpt    3  0,001 ±  
0,001  ops/ns
   [info] IdGeneratorBanchmark.measureThreadLocalRandom   thrpt    3  2,312 ±  
0,531  ops/ns
   ```
   
   While its still faster than secure random its now much slower than thread 
local random, i.e. performance impact was significant. Rewriting the algorithm 
with AtomicLong/volatile can likely mitigate this greatly


-- 
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]

Reply via email to