The Computer Language
24.09 Benchmarks Game

Java versus Java OpenJ9 fastest performance

How the programs are written matters! Always look at the source code.

If the fastest programs are hand-written vector instructions, does the host language matter? You might be more interested in the less optimised programs — more seconds, less gz source code.

fannkuch-redux
source secs mem gz cpu secs
Java 10.04 42,708 1289 39.47
Java #3 40.81 42,920 1264 40.91
Java OpenJ9 #3 43.48 60,828 1264 43.81
Java #2 44.33 41,012 520 44.38
Java OpenJ9 12.08 61,032 1289 47.09
Java OpenJ9 #2 52.36 62,740 520 52.54
n-body
source secs mem gz cpu secs
Java #5 6.79 41,476 1435 6.83
Java #4 6.91 41,364 1495 6.95
Java #2 7.58 41,440 1430 7.62
Java #3 7.63 41,352 1436 7.67
Java 7.89 41,616 1437 7.93
Java OpenJ9 #4 10.49 70,480 1495 10.66
Java OpenJ9 #2 10.98 70,236 1430 11.17
Java OpenJ9 #3 11.01 69,788 1436 11.20
Java OpenJ9 11.52 70,428 1437 11.72
Java OpenJ9 #5 11.89 70,304 1435 12.09
spectral-norm
source secs mem gz cpu secs
Java #3 1.69 43,028 762 6.41
Java OpenJ9 #2 1.85 58,096 956 6.65
Java 7.08 42,384 521 7.14
Java OpenJ9 #3 2.31 64,256 762 8.43
Java #2 2.44 42,180 956 9.47
Java OpenJ9 10.44 57,676 521 10.67
mandelbrot
source secs mem gz cpu secs
Java #2 4.14 81,668 802 16.25
Java #4 4.44 104,696 667 16.25
Java #6 4.31 81,888 808 16.97
Java OpenJ9 #6 5.28 121,716 808 20.42
Java OpenJ9 #4 6.37 133,496 667 23.21
Java OpenJ9 #2 6.00 123,668 802 23.28
Java 25.75 41,428 671 25.81
Java OpenJ9 26.79 73,420 671 26.97
Java OpenJ9 #3 7.10 122,916 910 27.59
Java #3 7.42 81,216 910 29.33
pidigits
source secs mem gz cpu secs
Java #3 0.94 40,944 770 0.96
Java OpenJ9 #3 1.08 58,244 770 1.15
Java #2 1.35 44,528 944 1.42
Java OpenJ9 #2 1.51 73,768 944 1.58
Java 7.63 491,600 807 8.66
Java OpenJ9 11.26 93,288 807 12.24
regex-redux
source secs mem gz cpu secs
Java #8 1.62 372,312 2201 3.20
Java 8.58 586,528 875 16.95
Java #6 5.59 1,235,356 746 17.14
Java #3 5.25 629,428 935 17.37
Java OpenJ9 #6 8.90 483,136 746 25.61
Java OpenJ9 #3 8.97 484,568 935 25.70
Java OpenJ9 14.14 421,008 875 25.94
Java OpenJ9 #8   Failed  
fasta
source secs mem gz cpu secs
Java #4 3.16 42,812 1528 3.27
Java OpenJ9 #4 3.48 61,272 1528 3.61
Java #6 1.18 48,364 2549 3.74
Java #5 1.26 48,824 2478 4.17
Java #2 4.39 47,624 1259 4.56
Java OpenJ9 #5 1.51 63,764 2478 4.57
Java OpenJ9 #6 1.54 68,428 2549 4.74
Java OpenJ9 #2 5.26 63,484 1259 5.48
k-nucleotide
source secs mem gz cpu secs
Java 5.02 369,032 1821 16.31
Java #3 7.26 365,384 1642 25.09
Java #6 7.26 365,680 1614 25.28
Java #4 34.70 195,564 1887 35.08
Java OpenJ9 24.05 397,412 1821 35.09
Java OpenJ9 #3 11.33 356,560 1642 37.30
Java #5 20.44 218,932 2225 44.56
Java OpenJ9 #4 45.35 225,528 1887 46.17
Java OpenJ9 #5 22.22 223,540 2225 55.23
Java OpenJ9 #6 29.83 410,424 1614 55.53
reverse-complement
source secs mem gz cpu secs
Java #6 3.40 2,031,576 760 4.06
Java #5 4.78 1,096,264 1115 4.92
Java #4 5.59 1,890,020 656 5.71
Java #7 23.61 1,036,152 1654 6.24
Java OpenJ9 #6 6.18 2,055,184 760 7.36
Java OpenJ9 #5 7.84 1,148,652 1115 8.39
Java OpenJ9 #4 37.16 1,916,220 656 37.74
Java OpenJ9 #7 158.33 1,076,516 1654 281.96
Java OpenJ9 #8   Bad Output  
Java OpenJ9 #3   Bad Output  
Java #3   Bad Output  
Java #8   Bad Output  
binary-trees
source secs mem gz cpu secs
Java #4 4.46 1,957,564 846 5.19
Java #3 4.90 2,032,184 546 5.67
Java #6 5.02 2,065,280 535 5.79
Java #2 5.11 2,064,188 558 5.83
Java OpenJ9 #7 2.22 1,160,464 841 7.03
Java OpenJ9 #4 5.40 716,792 846 7.91
Java #7 2.59 1,718,620 841 8.08
Java OpenJ9 #6 5.66 623,232 535 8.58
Java OpenJ9 #3 5.77 930,108 546 8.67
Java OpenJ9 #2 5.75 601,712 558 8.70
Java

java 22 2024-03-19
Java HotSpot(TM) 64-Bit Server VM
(build 22+36-2370,
mixed mode, sharing)

Java OpenJ9

javac 21.0.2