Re:Java BitSet performance-flicker mystery
by cospaia on Saturday February 05, 2022 @06:03PM
(#30227248)
A datapoint I just discovered. On JDK7 the performance is stable at the 0.5X level. It starts to toggle between 0.5X and 1X on JDK8.
[ Parent
| on HN ]
Re:Java BitSet performance-flicker mystery
by toomanydoubts on Saturday February 05, 2022 @06:07PM
(#30227278)
Could it be that "0.5x" speed is actually 1x, and you're seeing your algorithm run at 2x sometimes on JDK8+ due to some optimization?
(Not a JVM user, so take with a grain of salt).
Re:Java BitSet performance-flicker mystery
by cospaia on Saturday February 05, 2022 @06:16PM
(#30227364)
Yes, 1X, 0.5X are a bit arbitrary. I mean 1X as the speed I know it can run at. So it could well be that with JDK7 the optimizations could not happen and that the question then is why the optimizations do not always happen.
Making each run longer, 1 minute instead of 5 seconds displays the same performance toggling:
0 - Passes: 72705, count: 78498, Valid: true 1 - Passes: 33140, count: 78498, Valid: true 2 - Passes: 71867, count: 78498, Valid: true 3 - Passes: 33137, count: 78498, Valid: true 4 - Passes: 72264, count: 78498, Valid: true 5 - Passes: 72062, count: 78498, Valid: true 6 - Passes: 33021, count: 78498, Valid: true 7 - Passes: 33053, count: 78498, Valid: true 8 - Passes: 71902, count: 78498, Valid: true 9 - Passes: 33024, count: 78498, Valid: true
(JDK17 in this case)