The Computer Language
23.02 Benchmarks Game

Lua 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
Node js #5 11.08 81,124 1313 43.87
Lua 682.73 10,804 462 682.65
n-body
source secs mem gz cpu secs
Node js #6 8.41 45,908 1268 9.39
Lua #2 229.78 10,808 1193 229.75
Lua #4 232.46 10,808 1305 232.43
Lua 254.76 10,808 1201 254.73
spectral-norm
source secs mem gz cpu secs
Node js #7 5.36 46,704 414 5.37
Node js 5.44 47,212 319 5.45
Node js #6 1.66 88,700 999 6.10
Lua 80.44 10,812 329 80.43
mandelbrot
source secs mem gz cpu secs
Node js #3 4.03 118,432 1122 15.92
Node js #2 28.20 53,644 416 28.23
Node js 130.80 49,372 373 130.71
Lua 248.57 10,804 359 248.45
Lua #3 248.71 10,804 358 248.58
Lua #2 278.69 10,804 367 278.60
Lua #6 83.70 282,188 623 291.04
pidigits
source secs mem gz cpu secs
Node js #4 1.26 49,328 481 1.28
Node js #2 12.95 78,356 397 12.97
Node js #3 13.09 78,112 424 13.11
Lua   Failed  
Lua #5   Failed  
Lua #7   Failed  
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
Lua   Failed  
fasta
source secs mem gz cpu secs
Node js #5 2.20 94,408 2047 6.32
Lua #2 26.26 10,804 1061 26.26
Lua #3 26.28 10,804 1061 26.27
Node js 33.14 54,432 809 33.43
k-nucleotide
source secs mem gz cpu secs
Node js #3 15.72 416,500 1812 43.32
Lua #2 113.00 596,368 613 112.94
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
Node js #2 15.94 731,396 1221 16.58
Lua #2 42.06 2,654,608 553 42.05
Lua #5 43.98 2,169,452 719 43.97
Lua #4 53.18 1,029,636 594 53.12
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
Node js #7 33.78 1,135,992 451 38.12
Lua #2 142.37 963,576 412 142.35
Lua #3 83.64 927,420 684 166.50
Lua #4 49.08 927,412 664 180.68
Lua

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

Node js

build 19.0.1+10-21