The Computer Language
24.09 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 31.22 103,884 1264 31.51
Java GraalVM 8.71 104,004 1289 34.28
Java GraalVM #2 36.87 102,344 520 37.08
Java 10.04 42,708 1289 39.47
Java #3 40.81 42,920 1264 40.91
Java #2 44.33 41,012 520 44.38
n-body
source secs mem gz cpu secs
Java GraalVM #4 5.99 100,556 1495 6.22
Java #5 6.79 41,476 1435 6.83
Java GraalVM #3 6.74 101,692 1436 6.91
Java GraalVM #2 6.75 101,572 1430 6.92
Java #4 6.91 41,364 1495 6.95
Java GraalVM 6.76 101,080 1437 6.96
Java GraalVM #5 7.03 102,468 1435 7.29
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
spectral-norm
source secs mem gz cpu secs
Java GraalVM 5.52 104,788 521 5.75
Java GraalVM #3 1.67 103,732 762 6.23
Java #3 1.69 43,028 762 6.41
Java GraalVM #2 1.70 103,624 956 6.48
Java 7.08 42,384 521 7.14
Java #2 2.44 42,180 956 9.47
mandelbrot
source secs mem gz cpu secs
Java GraalVM #4 4.36 143,980 667 15.92
Java #2 4.14 81,668 802 16.25
Java #4 4.44 104,696 667 16.25
Java GraalVM #2 4.16 140,788 802 16.31
Java GraalVM #6 4.22 142,508 808 16.48
Java #6 4.31 81,888 808 16.97
Java 25.75 41,428 671 25.81
Java #3 7.42 81,216 910 29.33
Java GraalVM 30.03 102,212 671 30.25
Java GraalVM #3 7.74 138,600 910 30.49
pidigits
source secs mem gz cpu secs
Java #3 0.94 40,944 770 0.96
Java GraalVM #3 0.98 101,452 770 1.14
Java #2 1.35 44,528 944 1.42
Java GraalVM #2 1.40 106,424 944 1.64
Java GraalVM 6.71 543,856 807 7.63
Java 7.63 491,600 807 8.66
regex-redux
source secs mem gz cpu secs
Java #8 1.62 372,312 2201 3.20
Java GraalVM #8 1.67 434,920 2201 3.53
Java GraalVM 7.86 689,492 875 16.49
Java GraalVM #3 5.06 680,056 935 16.56
Java GraalVM #6 5.40 1,294,184 746 16.63
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
fasta
source secs mem gz cpu secs
Java #4 3.16 42,812 1528 3.27
Java GraalVM #4 3.19 108,728 1528 3.68
Java GraalVM #6 1.30 107,992 2549 3.70
Java #6 1.18 48,364 2549 3.74
Java GraalVM #5 1.29 109,100 2478 3.90
Java #5 1.26 48,824 2478 4.17
Java GraalVM #2 3.96 108,608 1259 4.46
Java #2 4.39 47,624 1259 4.56
k-nucleotide
source secs mem gz cpu secs
Java GraalVM 4.64 436,508 1821 14.87
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 GraalVM #3 7.41 442,648 1642 26.30
Java GraalVM #6 7.45 442,092 1614 26.65
Java GraalVM #4 31.70 257,432 1887 32.73
Java #4 34.70 195,564 1887 35.08
Java #5 20.44 218,932 2225 44.56
Java GraalVM #5 21.54 286,184 2225 49.02
reverse-complement
source secs mem gz cpu secs
Java #6 3.40 2,031,576 760 4.06
Java GraalVM #5 4.17 1,163,696 1115 4.91
Java #5 4.78 1,096,264 1115 4.92
Java GraalVM #6 3.67 2,084,380 760 5.15
Java #4 5.59 1,890,020 656 5.71
Java GraalVM #4 5.66 1,912,684 656 6.13
Java #7 23.61 1,036,152 1654 6.24
Java GraalVM #7 23.35 1,097,708 1654 6.72
Java GraalVM #3   Bad Output  
Java #3   Bad Output  
Java GraalVM #8   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 GraalVM #2 4.37 2,214,496 558 5.28
Java GraalVM #6 4.53 2,198,496 535 5.53
Java GraalVM #3 4.60 2,188,528 546 5.56
Java #3 4.90 2,032,184 546 5.67
Java GraalVM #4 4.77 2,219,900 846 5.77
Java #6 5.02 2,065,280 535 5.79
Java #2 5.11 2,064,188 558 5.83
Java #7 2.59 1,718,620 841 8.08
Java GraalVM #7 2.63 1,790,716 841 8.46
Java

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

Java GraalVM

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