The Computer Language
24.11 Benchmarks Game

Java versus Java GraalVM 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 GraalVM #3 34.03 90,752 1264 34.21
Java GraalVM 9.33 91,152 1289 36.72
Java GraalVM #2 38.48 91,636 520 38.63
Java #3 39.96 44,308 1264 40.06
Java GraalVM #8 42.18 91,368 517 42.35
Java 10.85 44,612 1289 42.80
Java #2 45.77 42,552 520 45.83
Java #8 45.90 42,568 517 45.97
n-body
source secs mem gz cpu secs
Java GraalVM #4 6.22 90,128 1495 6.36
Java GraalVM #5 6.47 90,344 1435 6.61
Java #4 6.88 42,028 1495 6.91
Java GraalVM #3 6.89 89,592 1436 7.03
Java GraalVM #2 6.90 89,600 1430 7.03
Java GraalVM #8 7.11 88,832 1322 7.24
Java #5 7.30 43,424 1435 7.36
Java GraalVM 7.31 89,724 1437 7.44
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
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 GraalVM #3 1.64 92,416 762 6.14
Java GraalVM #2 1.80 92,800 956 6.83
Java GraalVM #8 11.19 91,648 453 11.38
mandelbrot
source secs mem gz cpu secs
Java GraalVM #4 4.37 138,740 667 16.04
Java #2 4.08 82,216 802 16.06
Java #4 4.41 105,000 667 16.14
Java GraalVM #2 4.14 132,372 802 16.30
Java GraalVM #6 4.16 129,024 808 16.36
Java #6 4.19 82,232 808 16.42
Java 24.50 42,272 671 24.57
Java GraalVM 26.60 90,356 671 26.78
Java #3 6.96 82,972 910 27.54
Java #8 27.67 45,844 441 27.79
Java GraalVM #3 7.27 127,788 910 28.79
Java GraalVM #8 29.95 93,304 441 30.20
fasta
source secs mem gz cpu secs
Java #4 3.28 44,352 1528 3.40
Java GraalVM #6 1.28 99,840 2549 3.66
Java #6 1.16 49,848 2549 3.71
Java GraalVM #5 1.27 97,536 2478 3.75
Java #5 1.24 49,640 2478 4.13
Java GraalVM #4 3.55 142,080 1528 4.56
Java #2 4.45 48,896 1259 4.60
Java GraalVM #2 4.63 142,480 1259 5.61
Java #8 15.11 77,032 894 15.49
Java GraalVM #8 15.83 96,000 894 16.43
k-nucleotide
source secs mem gz cpu secs
Java GraalVM 4.31 475,296 1821 13.63
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 GraalVM #6 7.69 471,456 1614 27.24
Java GraalVM #3 7.79 472,096 1642 27.63
Java GraalVM #4 33.45 239,724 1887 34.10
Java #4 34.33 197,748 1887 34.67
Java GraalVM #5 15.99 248,224 2225 38.12
Java #5 22.10 222,396 2225 48.14
Java #8 78.46 2,083,000 786 80.86
Java GraalVM #8 84.32 1,586,392 786 87.17
reverse-complement
source secs mem gz cpu secs
Java #6 3.15 2,032,996 760 3.79
Java GraalVM #6 3.44 2,080,968 760 4.23
Java #5 4.72 1,097,732 1115 4.84
Java GraalVM #5 4.95 1,145,720 1115 5.31
Java #4 5.65 1,891,656 656 5.77
Java GraalVM #4 5.69 1,906,560 656 5.99
Java #7 23.98 1,037,708 1654 6.26
Java GraalVM #7 24.65 1,180,012 1654 12.56
Java GraalVM #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 GraalVM #2 5.11 1,948,200 558 6.99
Java GraalVM #4 5.42 1,815,132 846 7.22
Java #8 6.57 1,767,108 596 7.29
Java GraalVM #6 6.00 1,794,592 535 7.91
Java #7 2.62 1,803,192 841 8.14
Java GraalVM #3 5.95 1,880,164 546 8.60
Java GraalVM #7 2.81 1,850,008 841 8.76
Java GraalVM #8 7.19 1,757,812 596 9.15
pidigits
source secs mem gz cpu secs
* Java #3 0.80 41,900 770 0.83
Java GraalVM #3 0.84 87,552 770 0.96
* Java #2 1.29 45,768 944 1.37
Java GraalVM #2 1.34 96,384 944 1.53
Java GraalVM 7.08 528,896 807 8.13
Java 7.68 482,056 807 8.75
regex-redux
source secs mem gz cpu secs
Java #2 1.55 372,764 2201 3.16
Java GraalVM #2 1.56 408,236 2201 3.36
Java GraalVM 7.95 617,884 875 15.48
Java GraalVM #3 4.93 646,312 935 16.03
Java GraalVM #6 5.21 1,281,824 746 16.40
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

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

Java GraalVM

openjdk 23 2024-09-17
Java HotSpot(TM) 64-Bit Server VM
OpenJDK GraalVM CE
(build 23+37-jvmci-b01,
mixed mode, sharing)