The Computer Language
22.05 Benchmarks Game

Fastest cpu secs Perl 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
Node js #5 85,336 1313 44.58
Perl #3 5,064 427 1,267.96
Perl #2 12,308 570 1,626.37
Perl 5,288 457 1,731.08
n-body
source mem gz cpu
Node js #6 41,056 1268 8.43
Perl #2 6,280 1429 492.03
spectral-norm
source mem gz cpu
Node js #7 41,524 414 5.38
Node js 41,668 319 5.45
Node js #6 90,932 999 6.20
Perl #4 12,044 555 92.70
Perl #5 7,732 340 99.89
Perl 7,708 333 105.24
Perl #2 7,040 343 484.05
Perl #3 18,328 850 498.71
mandelbrot
source mem gz cpu
Node js #3 118,180 1122 16.00
Node js #2 48,484 416 28.21
Node js 43,580 373 65.26
Perl 62,064 586 1,883.51
pidigits
source mem gz cpu
Node js #4 45,096 481 1.14
Perl #4 8,356 261 1.84
Perl #2 8,368 389 1.96
Perl 12,616 463 9.93
Node js #2 72,556 397 13.11
Node js #3 72,536 424 13.22
regex-redux
source mem gz cpu
Node js #3 1,045,556 668 5.97
Node js #4 985,940 463 6.24
Perl 205,584 464 21.87
Perl #2 204,960 710 28.74
Perl #3 157,276 854 29.80
Perl #4 157,228 820 29.95
Perl #5   Bad Output  
fasta
source mem gz cpu
Node js #5 101,844 2047 6.38
Node js 50,304 809 37.60
Perl 55,124 871 62.41
Perl #4 6,336 966 129.28
Perl #2 6,224 922 198.31
k-nucleotide
source mem gz cpu
Node js #3 419,748 1812 43.70
Node js #2 72,156 935 112.88
Node js 621,752 1008 115.69
Perl #2 659,704 359 131.83
Perl 1,253,716 652 146.30
Perl #4 1,069,344 476 150.18
Perl #3 1,147,148 513 184.94
reverse-complement
source mem gz cpu
Node js #7 1,556,168 1480 4.97
Perl #3 1,495,156 287 6.47
Node js #2 727,572 1221 16.87
binary-trees
source mem gz cpu
Node js #6 1,322,340 744 27.83
Node js 1,173,028 711 36.72
Node js #7 1,107,220 451 40.72
Perl #5 1,048,472 797 209.51
Perl 599,520 395 252.39
Perl #4 2,519,768 761 274.10
Perl #3 2,200,608 648 390.15
Perl

This is perl 5, version 34
subversion 0 (v5.34.0)
x86_64-linux-thread-multi

Node js

v18.1.0