eclipse-vertx / vert.x

Vert.x is a tool-kit for building reactive applications on the JVM
http://vertx.io
Other
14.32k stars 2.08k forks source link

AccessMode.CONCURRENT's VarHandle should be a constant (Fixes #5216) #5217

Closed franz1981 closed 5 months ago

franz1981 commented 5 months ago

This is fixing #5216

Benchmarks results show the improvement (magnified by clearly the "nano"-benchmarking effect):

Benchmark                   Mode  Cnt  Score   Error  Units
AccessModeBenchmark.getNew  avgt   20  0.835 ± 0.008  ns/op
AccessModeBenchmark.getOld  avgt   20  6.253 ± 0.065  ns/op
AccessModeBenchmark.putNew  avgt   20  1.921 ± 0.012  ns/op
AccessModeBenchmark.putOld  avgt   20  8.474 ± 0.211  ns/op