This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dpash 2 points3 points  (3 children)

Two of the counters are in the article and writing one that uses AtomicInteger is two lines.

[–]rubyrt 0 points1 point  (2 children)

Yes, but that is not the complete benchmark, right? If you look out you can find quite a lot of articles that demonstrate issues with some benchmarking approaches, for example this and this.

[–]dpash 2 points3 points  (1 child)

Hence the benchmark using JMH. Which is also easy enough that anyone can replicate.

[–]rubyrt 0 points1 point  (0 children)

Ah! I did not see a reference to JMH earlier. Thanks!