3 ms·
AFAIK synchronized isn't a fair lock but according to the spec it's implementation dependent. The numbers are bad because OP is using manual benchmarking and f
by invalidname 2y ago
AFAIK synchronized isn't a fair lock but according to the spec it's implementation dependent.
The numbers are bad because OP is using manual benchmarking and falling for the microbenchmarking traps with JIT optimizations. There's no warmup or anything...