The Computer Language
Benchmarks Game

Lua versus Node js fastest programs

Always look at the source code.

These are only the fastest programs. Do some of them use manually vectorized SIMD? Look at the other programs. They may seem more-like a fair comparison to you.

regex-redux
source secs mem gz busy cpu load
Lua 2.57 326,464 482 2.61 1% 100% 1% 0%
Node js 4.64 1,163,148 668 5.83 3% 14% 30% 79%
binary-trees
source secs mem gz busy cpu load
Lua 48.15 923,628 664 178.89 97% 92% 91% 91%
Node js 7.52 1,343,968 744 22.37 73% 70% 85% 69%
k-nucleotide
source secs mem gz busy cpu load
Lua 114.82 596,536 613 115.62 0% 100% 0% 0%
Node js 15.68 397,548 1812 44.40 82% 95% 44% 62%
fasta
source secs mem gz busy cpu load
Lua 25.72 2,840 1061 25.76 100% 0% 0% 0%
Node js 1.89 71,820 2047 6.13 79% 79% 81% 85%
reverse-complement
source secs mem gz busy cpu load
Lua 40.62 2,654,732 553 41.04 0% 100% 1% 0%
Node js 2.17 1,535,512 1480 4.64 62% 53% 56% 42%
n-body
source secs mem gz busy cpu load
Lua 208.01 1,240 1305 208.83 0% 0% 100% 0%
Node js 8.63 36,136 1268 8.67 0% 0% 100% 0%
mandelbrot
source secs mem gz busy cpu load
Lua 113.06 18,572 623 394.49 86% 100% 77% 86%
Node js 4.03 95,448 1122 15.91 99% 98% 99% 100%
fannkuch-redux
source secs mem gz busy cpu load
Lua 526.61 1,296 462 534.49 0% 0% 1% 100%
Node js 11.60 64,024 1313 45.89 99% 99% 99% 99%
spectral-norm
source secs mem gz busy cpu load
Lua 79.73 2,780 329 79.91 0% 0% 100% 0%
Node js 1.64 67,584 999 6.12 92% 92% 93% 95%
pidigits
source secs mem gz busy cpu load
Lua   Failed
Node js 1.29 37,068 599 1.36 1% 100% 2% 2%
Lua

Lua 5.4.2 Copyright (C) 1994-2020 Lua.org, PUC-Rio

Node js

v16.3.0