Seeing the machine code of your Java program, with a few lines of Java
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Daniel Lemire used Richard Startin's instructive library, which samples the running machine instruction every 10 ms, to profile RoaringBitmap's andCardinality. On an Apple M4 Max with JDK 25, a call took 115 µs. He traces this to a dependency chain through one vector register used for bit counting. JDK 27 vectorizes the loop and runs about seven times faster. On an Intel Xeon with AVX-512, both JDKs took about 10 µs. The figures are his own, from one workload, without independent verification.