The Computer Language
22.05 Benchmarks Game

Fastest cpu secs Go versus Node js

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 cpu seconds, less gz source code.

fannkuch-redux
source mem gz cpu
Go #3 2,260 969 32.88
Node js #5 85,336 1313 44.58
Go 2,956 900 47.36
Go #2 11,316 896 47.56
n-body
source mem gz cpu
Go #3 1,136 1200 6.38
Go 1,136 1310 6.58
Go #2 1,132 1215 6.94
Node js #6 41,056 1268 8.43
spectral-norm
source mem gz cpu
Go 2,452 411 5.33
Node js #7 41,524 414 5.38
Node js 41,668 319 5.45
Go #4 1,952 548 5.67
Go #2 1,420 668 5.68
Node js #6 90,932 999 6.20
mandelbrot
source mem gz cpu
Go #4 33,812 905 14.85
Go #3 34,028 894 14.91
Node js #3 118,180 1122 16.00
Go 32,600 823 19.58
Go #2 33,196 837 27.07
Go #6 32,764 700 27.25
Node js #2 48,484 416 28.21
Node js 43,580 373 65.26
pidigits
source mem gz cpu
Go #4 8,732 683 0.87
Node js #4 45,096 481 1.14
Go #3 9,320 603 1.18
Go 9,496 708 1.21
Go #2 9,032 733 1.59
Go #8 9,924 720 2.54
Go #7 8,620 696 5.05
Node js #2 72,556 397 13.11
Node js #3 72,536 424 13.22
regex-redux
source mem gz cpu
Go #5 306,476 810 5.97
Node js #3 1,045,556 668 5.97
Node js #4 985,940 463 6.24
Go #4 355,844 829 34.99
Go #3 358,472 829 67.28
Go 297,048 741 68.45
fasta
source mem gz cpu
Go 1,112 1053 3.64
Go #2 10,980 1404 3.84
Go #3 3,168 1358 3.98
Node js #5 101,844 2047 6.38
Node js 50,304 809 37.60
k-nucleotide
source mem gz cpu
Go #7 159,432 1607 28.49
Go #6 149,712 1590 29.40
Go #4 144,528 1543 30.22
Go #3 149,984 1722 30.25
Node js #3 419,748 1812 43.70
Node js #2 72,156 935 112.88
Node js 621,752 1008 115.69
reverse-complement
source mem gz cpu
Go #2 826,796 611 1.94
Go #3 826,544 605 2.13
Go #5 1,483,756 996 2.26
Go #6 1,289,572 1338 2.48
Node js #7 1,556,168 1480 4.97
Node js #2 727,572 1221 16.87
Go   Failed  
binary-trees
source mem gz cpu
Node js #6 1,322,340 744 27.83
Go #6 411,424 611 29.23
Node js 1,173,028 711 36.72
Node js #7 1,107,220 451 40.72
Go #2 632,396 666 48.67
Go #3 328,700 799 50.09
Go #5 394,800 950 50.52
Go 240,292 482 51.02
Go #7 259,088 525 51.41
Go

go version go1.18 linux/amd64

Node js

v18.1.0