pjfanning commented on PR #371: URL: https://github.com/apache/incubator-pekko/pull/371#issuecomment-1593031773
> > I tried a solution with an AtomicReference around the state but its performance was slower than the synchronization and Semaphore locking variants. Approximately in SecureRandom territory in the 8 threads microbenchmark. > > This isn't too surprising, I suspect that if you wanted to get any tangible benefits of `AtomicLong`/`volatile` you would need to use it on the individual variables (i.e. index/counter etc etc) where its needed which is hard to do correctly Unfortunately, the 3 numbers in the state are all important. And they should be updated together, so I find it hard to see any solution based on AtomicLongs or AtomicReferences. Using the Semaphore locking has the best result in my testing. Could we just go with that for RC1? We are very likely to need an RC2 so there is time for someone to find a better solution. -- 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]
