The Computer Language
25.01 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
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Java GraalVM #3 34.06 116,621 1264 34.17—34.51
Java GraalVM 9.36 117,039 1289 36.70—37.17
Java #3 38.64 61,968 1264 40.13—41.03
Java GraalVM #2 38.58 114,282 520 39.51—41.00
Java GraalVM #8 42.20 113,545 517 43.24—44.83
Java 10.87 62,976 1289 43.03—43.87
Java #8 44.98 60,264 517 46.66—52.75
Java #2 45.71 60,203 520 48.13—55.01
n-body
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Java GraalVM #4 6.27 116,593 1495 6.40
Java GraalVM #5 6.52 116,314 1435 6.65
Java #4 6.92 60,592 1495 6.93
Java GraalVM #3 6.94 116,380 1436 7.07
Java GraalVM #2 6.95 116,031 1430 7.10—7.14
Java GraalVM #8 7.16 115,704 1322 7.29—7.33
Java #5 7.35 61,727 1435 7.40
Java GraalVM 7.35 115,048 1437 7.49—7.53
Java #2 7.51 60,969 1430 7.53
Java #3 7.54 60,903 1436 7.55
Java #8 7.61 61,170 1322 7.63—7.75
Java 7.89 61,268 1437 7.91
spectral-norm
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Java #8 5.48 62,124 453 5.52
Java #3 1.63 62,898 762 6.02
Java GraalVM #3 1.68 116,564 762 6.27—6.37
Java #2 1.65 62,132 956 6.18—6.22
Java GraalVM #2 1.87 118,137 956 6.97—7.09
Java GraalVM #8 11.23 116,929 453 11.43
mandelbrot
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Java #4 4.40 124,809 667 16.08—16.16
Java GraalVM #4 4.42 165,863 667 16.10—16.16
Java #2 4.13 100,966 802 16.25—16.45
Java GraalVM #2 4.20 155,144 802 16.48—16.72
Java #6 4.20 100,753 808 16.65—16.86
Java GraalVM #6 4.22 150,737 808 16.49—16.65
Java 24.56 60,998 671 24.65—24.78
Java GraalVM 26.65 116,056 671 26.83—26.88
Java #8 27.73 64,295 441 27.87—27.92
Java #3 7.10 101,376 910 32.70—36.60
Java GraalVM #3 7.31 151,974 910 28.83—28.92
Java GraalVM #8 30.04 116,031 441 30.43—31.77
fasta
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Java #4 3.32 62,714 1528 3.42
Java GraalVM #6 1.31 121,270 2549 3.70—3.74
Java #6 1.20 68,497 2549 3.73
Java GraalVM #5 1.29 122,753 2478 3.77—3.81
Java #5 1.28 68,518 2478 4.11—4.21
Java #2 4.43 64,213 1259 4.66—4.73
Java GraalVM #4 3.58 154,337 1528 4.66—5.34
Java GraalVM #2 4.65 118,997 1259 5.31—6.15
Java GraalVM #8 9.91 217,158 894 10.48—10.56
Java #8 10.26 200,471 894 11.02—11.14
k-nucleotide
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Java GraalVM 4.37 498,586 1821 13.05—22.53
Java 5.08 396,227 1821 16.73—17.38
Java #6 7.32 389,710 1614 25.54—26.50
Java #3 7.38 440,680 1642 25.45—26.09
Java GraalVM #3 7.74 494,371 1642 27.50—27.79
Java GraalVM #6 7.85 492,229 1614 27.72—27.82
Java GraalVM #4 33.00 267,084 1887 33.79—34.42
Java #4 34.62 218,296 1887 35.14—36.03
Java GraalVM #5 16.79 277,905 2225 38.58—40.27
Java #5 20.66 248,066 2225 45.27—46.83
Java #8 80.82 1,195,364 786 84.30—87.87
Java GraalVM #8 86.66 2,125,201 786 90.79—92.75
reverse-complement
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Java #6 3.22 2,103,075 760 3.88
Java GraalVM #6 3.52 2,157,462 760 4.31—4.35
Java #5 4.81 1,143,542 1115 4.94—5.03
Java GraalVM #5 5.03 1,200,001 1115 5.39
Java #4 5.81 1,956,385 656 5.94
Java GraalVM #4 5.80 2,017,374 656 6.12—6.16
Java GraalVM #3   Bad Output  
Java #7   Bad Output  
Java #3   Bad Output  
Java GraalVM #7   Bad Output  
binary-trees
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Java #4 4.50 1,774,043 846 5.65—5.96
Java #6 4.91 1,700,258 535 5.69—5.77
Java #3 4.89 1,627,595 546 5.71—5.82
Java #2 5.12 1,663,476 558 5.93—5.99
Java #8 6.53 1,673,216 596 7.30—7.39
Java GraalVM #2 5.56 1,684,255 558 7.41—7.47
Java GraalVM #4 5.96 1,735,082 846 7.77—7.84
Java #7 2.63 1,786,659 841 8.14—8.22
Java GraalVM #6 6.78 1,639,674 535 8.65—8.70
Java GraalVM #7 2.82 1,834,906 841 8.84—8.95
Java GraalVM #3 6.67 1,695,027 546 9.30—9.36
Java GraalVM #8 8.43 1,769,333 596 10.44—10.53
pidigits
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
* Java #3 0.84 60,449 770 0.85
Java GraalVM #3 0.88 111,956 770 0.97
* Java #2 1.33 64,856 944 1.39
Java GraalVM #2 1.37 120,668 944 1.55
Java GraalVM 7.11 462,918 807 8.12—8.15
Java 7.72 423,014 807 8.77—8.80
regex-redux
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Java GraalVM 7.56 582,382 875 15.48—15.93
Java GraalVM #3 5.06 658,108 935 16.74—17.53
Java 8.49 533,643 875 16.77—16.97
Java #3 5.30 652,009 935 17.10—17.22
Java GraalVM #6 5.51 1,334,669 746 17.29—17.63
Java #6 5.67 1,285,243 746 17.18—17.43
Java #2   Bad Output  
Java GraalVM #2   Bad Output  
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)