I picked 11 threads due to my CPU having 12 logical cores.
With 100 threads and incrementing 10 at a time, the LockBenchmark achieves 3,482,053 requests per second.
With 100 threads the lock free benchmark achieves 17,754,858 requests per second, 10 messages sending per synchronization event at a time.
In other words, the lock free algorithm scales better.
LockBenchmark code https://github.com/samsquire/multiversion-concurrency-contro...
Lock free actor2 algorithm https://github.com/samsquire/multiversion-concurrency-contro...
I picked 11 threads due to my CPU having 12 logical cores.
With 100 threads and incrementing 10 at a time, the LockBenchmark achieves 3,482,053 requests per second.
With 100 threads the lock free benchmark achieves 17,754,858 requests per second, 10 messages sending per synchronization event at a time.
In other words, the lock free algorithm scales better.
LockBenchmark code https://github.com/samsquire/multiversion-concurrency-contro...
Lock free actor2 algorithm https://github.com/samsquire/multiversion-concurrency-contro...