The Computer Language
23.02 Benchmarks Game

Go versus Node js fastest performance

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.25 10,936 969 32.92
Node js #5 11.08 81,124 1313 43.87
Go 11.83 11,128 900 47.26
Go #2 11.89 12,708 896 47.47
n-body
source secs mem gz cpu secs
Go #3 6.36 11,244 1200 6.37
Go 6.55 11,244 1310 6.56
Go #2 6.94 11,244 1215 6.95
Node js #6 8.41 45,908 1268 9.39
spectral-norm
source secs mem gz cpu secs
Go 5.31 11,244 411 5.32
Node js #7 5.36 46,704 414 5.37
Node js 5.44 47,212 319 5.45
Go #4 1.42 11,244 548 5.67
Go #2 1.44 11,244 668 5.67
Node js #6 1.66 88,700 999 6.10
mandelbrot
source secs mem gz cpu secs
Go #3 3.73 36,140 894 14.86
Go #4 3.73 36,116 905 14.87
Node js #3 4.03 118,432 1122 15.92
Go 4.92 33,624 823 19.65
Go #2 6.76 33,928 837 26.97
Go #6 6.83 33,632 700 27.22
Node js #2 28.20 53,644 416 28.23
Node js 130.80 49,372 373 130.71
pidigits
source secs mem gz cpu secs
Go #4 1.01 11,244 683 1.02
Node js #4 1.26 49,328 481 1.28
Go 1.37 11,244 708 1.38
Go #3 1.63 11,244 603 1.66
Go #2 1.97 11,244 733 2.00
Go #8 2.46 11,244 720 2.46
Go #7 4.80 23,844 696 5.31
Node js #2 12.95 78,356 397 12.97
Node js #3 13.09 78,112 424 13.11
regex-redux
source secs mem gz cpu secs
Node js #3 4.51 768,724 668 5.58
Node js #4 5.76 991,704 463 5.93
Go #5 4.14 302,280 810 6.25
Go #4 14.80 360,260 829 34.62
Go #3 27.89 368,528 829 67.15
Go 28.35 317,752 741 67.40
fasta
source secs mem gz cpu secs
Go 3.78 11,128 1053 3.78
Go #3 1.49 11,136 1358 4.10
Go #2 1.26 11,136 1404 4.26
Node js #5 2.20 94,408 2047 6.32
Node js 33.14 54,432 809 33.43
k-nucleotide
source secs mem gz cpu secs
Go #7 7.48 166,412 1607 28.68
Go #6 7.96 148,080 1590 29.25
Go #3 8.28 148,412 1722 29.93
Go #4 9.50 142,624 1543 31.55
Node js #3 15.72 416,500 1812 43.32
Node js #2 37.55 486,856 935 116.51
Node js 40.21 518,808 1008 117.96
reverse-complement
source secs mem gz cpu secs
Go #2 1.76 814,544 611 1.80
Go #3 1.96 814,352 605 2.00
Go #6 1.33 1,278,596 1338 2.46
Node js #2 15.94 731,396 1221 16.58
Go #5   Bad Output  
Go   Failed  
Node js #7   Bad Output  
binary-trees
source secs mem gz cpu secs
Node js 6.37 1,295,776 711 19.51
Node js #6 8.22 1,257,276 744 24.87
Go #6 27.82 410,808 611 28.59
Node js #7 33.78 1,135,992 451 38.12
Go #5 14.70 406,544 950 57.87
Go #2 14.69 642,688 666 58.49
Go #3 15.07 342,008 799 58.61
Go #7 33.37 247,824 525 60.85
Go 34.62 236,728 482 61.41
Go

go version go1.20 linux/amd64
GOAMD64=v2

Node js

build 19.0.1+10-21