IainHull commented on PR #385: URL: https://github.com/apache/incubator-pekko/pull/385#issuecomment-1588058717
> As an aside, do you know what the performance overhead of the additional code is? Of course, security is more important than raw performance. I performed a very simple benchmark of just `IdGenerator` the default `ThreadLocalRadom` implementation is way faster with 8 threads and lots of contention. This is because the `SecureRandom` and `Sequence` use `AtomicInteger` under the hood. ``` [info] Benchmark Mode Cnt Score Error Units [info] IdGeneratorBanchmark.measureSecureRandom thrpt 3 0.005 ± 0.008 ops/ns [info] IdGeneratorBanchmark.measureSequence thrpt 3 0.005 ± 0.002 ops/ns [info] IdGeneratorBanchmark.measureThreadLocalRandom thrpt 3 0.652 ± 0.670 ops/ns ``` I expect a more serious performance test that includes the collision detection etc would have to use a real DNS to get a full understanding of the overhead. -- 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]
