The Computer Language
22.05 Benchmarks Game

Fastest cpu secs Lua 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
Lua 1,420 462 700.03
n-body
source mem gz cpu
Node js #6 41,056 1268 8.43
Lua #4 1,404 1305 228.33
Lua #2 1,476 1193 231.51
Lua 1,416 1201 249.47
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
Lua 2,832 329 80.47
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
Lua #3 2,696 358 248.45
Lua 2,656 359 248.49
Lua #2 1,440 367 277.92
Lua #6 23,188 623 295.23
pidigits
source mem gz cpu
Node js #4 45,096 481 1.14
Node js #2 72,556 397 13.11
Node js #3 72,536 424 13.22
Lua #5   Failed  
Lua #7   Failed  
Lua   Failed  
regex-redux
source mem gz cpu
Lua 327,952 482 2.59
Node js #3 1,045,556 668 5.97
Node js #4 985,940 463 6.24
fasta
source mem gz cpu
Node js #5 101,844 2047 6.38
Lua #3 2,808 1061 26.72
Lua #2 2,812 1061 27.00
Node js 50,304 809 37.60
k-nucleotide
source mem gz cpu
Node js #3 419,748 1812 43.70
Lua #2 596,492 613 112.22
Node js #2 72,156 935 112.88
Node js 621,752 1008 115.69
reverse-complement
source mem gz cpu
Node js #7 1,556,168 1480 4.97
Node js #2 727,572 1221 16.87
Lua #2 2,654,764 553 41.55
Lua #5 2,163,180 719 45.44
Lua #4 1,030,160 594 53.35
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
Lua #2 963,568 412 144.57
Lua #3 927,544 684 167.23
Lua #4 927,464 664 182.34
Lua

Lua 5.4.4 Copyright (C)
1994-2022 Lua.org, PUC-Rio

Node js

v18.1.0