The Computer Language
24.09 Benchmarks Game

Java versus Java -Xint 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 #2 44.33 41,012 520 44.38
Java -Xint #2 627.34 35,140 520 627.56
Java -Xint #3 728.10 35,548 1264 728.36
Java -Xint 195.32 35,688 1289 773.57
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 -Xint #4 151.83 36,432 1495 151.88
Java -Xint #2 170.04 36,456 1430 170.10
Java -Xint #3 179.29 36,472 1436 179.34
Java -Xint 213.71 36,712 1437 213.78
Java -Xint #5 235.13 36,584 1435 235.21
spectral-norm
source secs mem gz cpu secs
Java #3 1.69 43,028 762 6.41
Java 7.08 42,384 521 7.14
Java #2 2.44 42,180 956 9.47
Java -Xint 66.64 37,624 521 66.66
Java -Xint #2 16.94 37,364 956 67.45
Java -Xint #3 26.52 38,144 762 104.99
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 25.75 41,428 671 25.81
Java #3 7.42 81,216 910 29.33
Java -Xint 360.79 36,456 671 360.89
Java -Xint #3 123.58 75,096 910 493.16
Java -Xint #4 169.49 98,792 667 623.32
Java -Xint #2 167.57 74,560 802 668.97
Java -Xint #6 169.59 74,596 808 677.13
pidigits
source secs mem gz cpu secs
Java #3 0.94 40,944 770 0.96
Java -Xint #3 0.97 36,068 770 0.97
Java #2 1.35 44,528 944 1.42
Java -Xint #2 1.46 38,108 944 1.46
Java 7.63 491,600 807 8.66
Java -Xint 169.97 187,788 807 170.09
regex-redux
source secs mem gz cpu secs
Java -Xint #8 1.71 359,788 2201 3.20
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 -Xint 511.95 533,008 875 910.97
Java -Xint #6 350.48 1,220,080 746 917.70
Java -Xint #3 348.75 557,332 935 921.34
fasta
source secs mem gz cpu secs
Java #4 3.16 42,812 1528 3.27
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 -Xint #5 8.93 40,668 2478 23.48
Java -Xint #4 25.08 35,808 1528 25.09
Java -Xint #6 9.07 40,680 2549 30.60
Java -Xint #2 36.98 35,556 1259 36.99
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 #5 20.44 218,932 2225 44.56
Java -Xint 170.38 354,848 1821 426.94
Java -Xint #4 652.29 187,136 1887 652.55
Java -Xint #5 287.75 207,376 2225 677.27
Java -Xint #3 406.38 353,036 1642 1,352.37
Java -Xint #6 407.44 354,940 1614 1,353.73
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 -Xint #6 40.00 2,027,292 760 49.20
Java -Xint #4 82.92 1,882,428 656 82.95
Java -Xint #5 163.39 1,089,208 1115 159.86
Java -Xint #7 634.12 1,029,688 1654 1,464.57
Java #3   Bad Output  
Java -Xint #3   Bad Output  
Java -Xint #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 #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 #7 2.59 1,718,620 841 8.08
Java -Xint #3 64.64 1,307,260 546 65.30
Java -Xint #6 67.43 1,323,672 535 68.11
Java -Xint #2 67.55 1,276,284 558 68.21
Java -Xint #4 84.28 1,067,788 846 84.92
Java -Xint #7 30.62 1,093,140 841 89.85
Java

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

Java -Xint

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