The Computer Language
24.09 Benchmarks Game

Go versus Node.js 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
Go #3 8.34 19,808 975 33.31
Node.js #5 11.47 94,880 1320 45.57
Go #8 46.13 19,440 500 46.24
Go 12.29 19,808 906 49.04
Go #2 12.35 19,808 903 49.32
Node.js #8 66.88 49,788 452 66.88
n-body
source secs mem gz cpu secs
Go #3 6.38 19,808 1207 6.40
Go 7.01 19,808 1316 7.03
Go #2 7.03 19,808 1222 7.05
Node.js #6 8.63 52,224 1274 8.63
Go #8 9.60 19,436 1224 9.62
Node.js #8 9.74 52,352 1173 9.75
spectral-norm
source secs mem gz cpu secs
Go 5.33 19,808 417 5.34
Node.js #7 5.36 51,956 420 5.37
Node.js 5.37 52,464 326 5.39
Go #2 1.50 19,808 674 5.68
Go #4 1.45 19,808 555 5.69
Node.js #6 1.57 102,656 1002 5.99
mandelbrot
source secs mem gz cpu secs
Go #4 3.76 35,456 912 14.99
Go #3 3.77 35,456 900 15.00
Node.js #3 4.02 132,224 1128 15.91
Go 5.02 33,024 829 20.02
Go #8 26.68 19,440 500 26.74
Go #2 6.85 33,152 843 27.28
Go #6 6.89 33,024 707 27.44
Node.js #2 29.59 59,424 422 29.62
Node.js 64.42 54,472 380 64.53
pidigits
source secs mem gz cpu secs
Go #4 0.82 19,808 689 0.83
Node.js #4 1.08 57,404 487 1.11
Go 1.18 19,808 715 1.20
Go #3 1.40 19,808 610 1.44
Go #2 1.84 19,808 740 1.89
Go #8 2.46 19,808 727 2.47
Go #7 4.99 19,808 702 5.61
Node.js #2 12.35 85,896 405 12.38
Node.js #3 12.48 85,704 431 12.51
regex-redux
source secs mem gz cpu secs
Node.js #3 4.31 799,680 675 5.34
Go #5 3.25 321,360 817 5.43
Node.js #4 5.54 966,596 471 5.68
Go #4 14.61 369,008 832 35.91
Go 25.37 319,956 749 61.07
Go #3 25.62 371,204 836 61.79
fasta
source secs mem gz cpu secs
Go 3.73 19,808 1055 3.74
Go #2 1.27 19,808 1405 4.06
Go #3 1.51 19,808 1362 4.09
Node.js #5 2.49 106,400 2050 6.99
Go #8 18.27 19,440 838 18.46
Node.js 38.06 57,560 815 38.45
Node.js #8 532.80 60,800 723 533.29
k-nucleotide
source secs mem gz cpu secs
Go #7 7.63 163,072 1613 28.79
Go #3 8.18 145,280 1729 29.88
Go #6 8.21 145,152 1596 30.01
Go #4 9.16 140,032 1552 31.38
Node.js #3 16.35 429,444 1817 44.67
Node.js #2 36.18 485,300 941 111.06
Node.js 37.58 351,188 1011 114.02
reverse-complement
source secs mem gz cpu secs
Go #2 2.19 800,640 614 2.29
Go #3 2.48 800,384 609 2.57
Go #6 1.91 1,244,508 1340 3.40
Node.js #2 15.71 728,180 1228 16.37
Go #5   Bad Output  
Go   Failed  
Node.js #7   Bad Output  
binary-trees
source secs mem gz cpu secs
Node.js #7 17.30 1,067,648 458 29.17
Go #6 27.90 404,096 618 29.26
Node.js #6 9.07 1,348,960 752 31.26
Node.js #8 20.33 1,130,716 521 32.93
Node.js 8.91 1,393,184 717 33.54
Go #2 14.17 624,780 672 56.29
Go #3 14.91 326,508 806 58.00
Go #5 14.87 425,960 957 58.15
Go 32.01 243,192 488 59.78
Go #7 32.52 248,604 531 61.47
Go

go version go1.23.1 linux/amd64
GOAMD64=v2

Node.js

v22.8.0