The Computer Language
24.11 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 #3 39.96 44,308 1264 40.06
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
Java -Xint #3 499.95 36,780 1264 500.14
Java -Xint 133.97 37,284 1289 530.29
Java -Xint #2 697.49 36,236 520 697.74
Java -Xint #8 707.70 36,720 517 707.97
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 -Xint #4 159.50 37,652 1495 159.56
Java -Xint #8 160.65 37,692 1322 160.71
Java -Xint #3 176.10 37,780 1436 176.16
Java -Xint #2 178.95 37,716 1430 179.00
Java -Xint 187.79 37,816 1437 187.85
Java -Xint #5 242.21 37,820 1435 242.29
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 -Xint #2 16.96 38,692 956 67.27
Java -Xint #8 79.75 38,572 453 79.77
Java -Xint #3 26.20 39,420 762 103.20
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 24.50 42,272 671 24.57
Java #3 6.96 82,972 910 27.54
Java #8 27.67 45,844 441 27.79
Java -Xint 359.45 37,564 671 359.57
Java -Xint #3 119.76 76,220 910 478.11
Java -Xint #4 162.05 100,116 667 606.17
Java -Xint #8 632.34 36,580 441 632.40
Java -Xint #2 204.60 75,772 802 817.30
Java -Xint #6 213.99 75,776 808 854.15
fasta
source secs mem gz cpu secs
Java #4 3.28 44,352 1528 3.40
Java #6 1.16 49,848 2549 3.71
Java #5 1.24 49,640 2478 4.13
Java #2 4.45 48,896 1259 4.60
Java #8 15.11 77,032 894 15.49
Java -Xint #5 8.92 41,784 2478 23.38
Java -Xint #4 25.45 37,036 1528 25.46
Java -Xint #6 9.13 41,896 2549 30.76
Java -Xint #2 36.96 36,780 1259 36.97
Java -Xint #8 673.66 107,836 894 673.30
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 #5 22.10 222,396 2225 48.14
Java #8 78.46 2,083,000 786 80.86
Java -Xint 174.09 358,964 1821 431.66
Java -Xint #4 722.69 188,368 1887 722.99
Java -Xint #5 358.39 208,936 2225 832.08
Java -Xint #3 380.98 358,232 1642 1,244.14
Java -Xint #6 380.79 358,368 1614 1,245.37
Java -Xint #8   Timed Out  
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 -Xint #6 39.58 2,028,304 760 48.30
Java -Xint #4 80.02 1,883,324 656 80.03
Java -Xint #5 179.32 1,090,164 1115 175.61
Java -Xint #7 733.63 1,031,048 1654 1,704.56
Java #3   Bad Output  
Java -Xint #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 #8 6.57 1,767,108 596 7.29
Java #7 2.62 1,803,192 841 8.14
Java -Xint #3 66.79 1,343,436 546 67.51
Java -Xint #6 67.36 1,378,776 535 68.09
Java -Xint #2 74.30 1,218,004 558 74.96
Java -Xint #8 94.28 1,163,864 596 95.00
Java -Xint #7 32.90 1,078,312 841 96.85
Java -Xint #4 98.08 1,000,460 846 98.84
pidigits
source secs mem gz cpu secs
* Java #3 0.80 41,900 770 0.83
Java -Xint #3 0.83 37,044 770 0.83
* Java #2 1.29 45,768 944 1.37
Java -Xint #2 1.41 39,092 944 1.41
Java 7.68 482,056 807 8.75
Java -Xint 183.26 188,632 807 183.38
regex-redux
source secs mem gz cpu secs
Java #2 1.55 372,764 2201 3.16
Java -Xint #2 1.61 359,548 2201 3.19
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 -Xint 555.92 559,068 875 993.20
Java -Xint #6 382.01 1,220,444 746 1,007.09
Java -Xint #3 380.77 564,672 935 1,009.25
Java

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

Java -Xint

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