The Computer Language
24.11 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.05 101,616 1320 43.85
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 58.06 51,484 452 58.05
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.55 54,100 1274 8.56
Node.js #8 9.58 53,716 1173 9.59
Go #8 9.60 19,436 1224 9.62
spectral-norm
source secs mem gz cpu secs
Go #8 5.33 19,416 429 5.34
Go 5.33 19,808 417 5.34
Node.js #7 5.36 53,724 420 5.37
Node.js 5.37 54,808 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.56 107,280 1002 5.99
Node.js #8 6.49 54,632 355 6.50
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.00 135,476 1128 15.83
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.36 61,144 422 29.39
Node.js 70.55 55,900 380 70.64
Node.js #8 72.49 56,116 412 72.52
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.52 112,392 2050 7.08
Go #8 18.27 19,440 838 18.46
Node.js 38.40 58,880 815 38.77
Node.js #8 531.27 62,400 723 531.53
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.48 436,784 1817 44.54
Node.js #2 38.24 486,844 941 112.58
Node.js 39.98 356,716 1011 117.63
Node.js #8   Bad Output  
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.44 731,804 1228 16.09
Go #5   Bad Output  
Go   Failed  
* Node.js #7   Bad Output  
binary-trees
source secs mem gz cpu secs
Node.js #7 16.02 1,070,260 458 28.26
Go #6 27.90 404,096 618 29.26
Node.js #6 8.60 1,250,816 752 30.68
Node.js #8 19.86 1,334,104 521 32.74
Node.js 8.92 1,405,276 717 33.60
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
pidigits
source secs mem gz cpu secs
* Go #4 0.82 19,808 689 0.83
Node.js #4 1.11 59,620 487 1.14
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 #6 2.46 19,512 727 2.46
Go #7 4.99 19,808 702 5.61
Node.js #2 12.16 87,228 405 12.19
Node.js #3 12.25 87,708 431 12.28
regex-redux
source secs mem gz cpu secs
Node.js #3 4.27 796,080 675 5.30
Go #5 3.25 321,360 817 5.43
Node.js #4 5.41 978,952 471 5.56
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
Go

go version go1.23.1 linux/amd64
GOAMD64=v2

Node.js

v23.0.0