The Computer Language
24.11 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 #3 39.96 44,308 1264 40.06
Java 10.85 44,612 1289 42.80
Java OpenJ9 #3 42.96 66,212 1264 43.25
Java #2 45.77 42,552 520 45.83
Java #8 45.90 42,568 517 45.97
Java OpenJ9 11.92 66,544 1289 46.80
Java OpenJ9 #8 54.90 76,632 517 55.21
Java OpenJ9 #2 54.98 68,256 520 55.27
n-body
source secs mem gz cpu secs
Java #4 6.88 42,028 1495 6.91
Java #5 7.30 43,424 1435 7.36
Java #2 7.48 42,260 1430 7.52
Java #3 7.49 42,292 1436 7.52
Java #8 7.59 42,924 1322 7.64
Java 7.84 42,652 1437 7.88
Java OpenJ9 #4 10.67 78,524 1495 10.83
Java OpenJ9 #3 11.25 78,816 1436 11.43
Java OpenJ9 #2 11.26 78,656 1430 11.44
Java OpenJ9 #8 11.55 77,432 1322 11.73
Java OpenJ9 11.83 78,996 1437 12.06
Java OpenJ9 #5 12.02 77,184 1435 12.21
spectral-norm
source secs mem gz cpu secs
Java #8 5.43 43,368 453 5.49
Java #3 1.57 44,160 762 5.93
Java #2 1.61 43,028 956 6.08
Java OpenJ9 #2 1.75 69,652 956 6.52
Java OpenJ9 #3 2.21 73,692 762 8.33
Java OpenJ9 #8 10.37 71,572 453 10.60
mandelbrot
source secs mem gz cpu secs
Java #2 4.08 82,216 802 16.06
Java #4 4.41 105,000 667 16.14
Java #6 4.19 82,232 808 16.42
Java OpenJ9 #6 5.17 132,880 808 20.24
Java OpenJ9 #4 6.31 133,440 667 23.20
Java OpenJ9 #2 5.92 132,360 802 23.21
Java 24.50 42,272 671 24.57
Java OpenJ9 26.81 76,808 671 27.07
Java #3 6.96 82,972 910 27.54
Java #8 27.67 45,844 441 27.79
Java OpenJ9 #3 7.71 129,500 910 30.32
Java OpenJ9 #8 30.60 110,372 441 31.46
fasta
source secs mem gz cpu secs
Java #4 3.28 44,352 1528 3.40
Java OpenJ9 #4 3.45 67,284 1528 3.66
Java #6 1.16 49,848 2549 3.71
Java #5 1.24 49,640 2478 4.13
Java OpenJ9 #6 1.44 71,496 2549 4.46
Java OpenJ9 #5 1.44 75,764 2478 4.50
Java #2 4.45 48,896 1259 4.60
Java OpenJ9 #2 5.18 65,184 1259 5.37
Java #8 15.11 77,032 894 15.49
Java OpenJ9 #8 18.45 84,432 894 18.93
k-nucleotide
source secs mem gz cpu secs
Java 4.92 427,448 1821 15.77
Java #6 7.27 426,032 1614 25.17
Java #3 7.34 426,540 1642 25.47
Java #4 34.33 197,748 1887 34.67
Java OpenJ9 25.93 353,340 1821 37.25
Java OpenJ9 #4 47.00 230,268 1887 47.60
Java #5 22.10 222,396 2225 48.14
Java OpenJ9 #5 22.30 230,684 2225 55.47
Java OpenJ9 #6 32.20 410,000 1614 61.17
Java OpenJ9 #3 33.04 406,700 1642 63.16
Java #8 78.46 2,083,000 786 80.86
Java OpenJ9 #8 92.25 1,237,708 786 97.94
reverse-complement
source secs mem gz cpu secs
Java #6 3.15 2,032,996 760 3.79
Java #5 4.72 1,097,732 1115 4.84
Java #4 5.65 1,891,656 656 5.77
Java #7 23.98 1,037,708 1654 6.26
Java OpenJ9 #6 5.85 2,066,988 760 6.94
Java OpenJ9 #4 6.89 1,934,944 656 7.42
Java OpenJ9 #5 8.06 1,141,716 1115 8.64
Java OpenJ9 #7 178.22 1,088,132 1654 322.65
Java OpenJ9 #3   Bad Output  
Java #3   Bad Output  
binary-trees
source secs mem gz cpu secs
Java #4 4.41 1,821,244 846 5.14
Java #6 4.87 1,782,568 535 5.63
Java #3 4.85 1,769,500 546 5.65
Java #2 5.09 1,820,068 558 5.83
Java OpenJ9 #2 4.50 589,508 558 7.12
Java #8 6.57 1,767,108 596 7.29
Java #7 2.62 1,803,192 841 8.14
Java OpenJ9 #7 2.43 1,163,020 841 8.17
Java OpenJ9 #4 5.58 643,232 846 8.52
Java OpenJ9 #3 5.77 927,036 546 8.80
Java OpenJ9 #6 5.94 692,352 535 9.08
Java OpenJ9 #8 6.32 603,660 596 9.08
pidigits
source secs mem gz cpu secs
* Java #3 0.80 41,900 770 0.83
Java OpenJ9 #3 0.88 74,760 770 0.95
* Java #2 1.29 45,768 944 1.37
Java OpenJ9 #2 1.36 78,192 944 1.49
Java 7.68 482,056 807 8.75
Java OpenJ9 11.48 91,116 807 12.60
regex-redux
source secs mem gz cpu secs
Java #2 1.55 372,764 2201 3.16
Java OpenJ9 #2 1.78 454,024 2201 4.87
Java 8.47 575,552 875 16.69
Java #6 5.60 1,237,440 746 17.12
Java #3 5.25 611,476 935 17.25
Java OpenJ9 #6 9.34 521,136 746 26.31
Java OpenJ9 #3 9.44 500,788 935 26.80
Java OpenJ9 14.74 424,988 875 26.86
Java

java 23 2024-09-17
Java HotSpot(TM) 64-Bit Server VM
(build 23+37-2369,
mixed mode, sharing)

Java OpenJ9

openjdk 23 2024-09-17
IBM Semeru Runtimebr> Eclipse OpenJ9
(build openj9-0.47.0)
(JIT enabled, AOT enabled)