The Computer Language
Benchmarks Game

Lua programs versus Python 3

by benchmark task performance

spectral-norm
source secs mem gz cpu cpu load
Lua 350.86 1,100 329 350.78 1% 0% 1% 100%
Python 3 1,105.41 7,120 328 1,105.02 1% 0% 0% 100%
n-body
source secs mem gz cpu cpu load
Lua 594.46 872 1305 594.32 0% 0% 1% 100%
Python 3 1,024.87 6,324 1228 1,024.54 1% 0% 1% 100%
pidigits
source secs mem gz cpu cpu load
Lua 2.82 3,088 479 2.82 1% 1% 1% 100%
Python 3 4.47 8,308 382 4.46 0% 36% 63% 100%
k-nucleotide
source secs mem gz cpu cpu load
Lua 242.46 724,636 613 242.00 0% 1% 1% 100%
Python 3 317.42 219,028 1937 317.16 0% 1% 1% 100%
mandelbrot
source secs mem gz cpu cpu load
Lua 1,039.59 18,044 623 1,039.32 0% 1% 1% 100%
Python 3 1,209.01 40,500 686 1,208.52 1% 0% 1% 100%
binary-trees
source secs mem gz cpu cpu load
Lua 482.57 1,035,484 446 481.98 0% 1% 1% 100%
Python 3 497.80 482,656 596 497.40 1% 1% 1% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Lua 2,593.59 820 462 2,593.04 1% 0% 1% 100%
Python 3 2,464.08 44,564 944 2,463.20 1% 0% 0% 100%
fasta
source secs mem gz cpu cpu load
Lua   Failed
Python 3 1.31 6,488 977 1.27 2% 1% 1% 100%
reverse-complement
source secs mem gz cpu cpu load
Lua   Failed
Python 3 0.11 ? 800 0.09 0% 0% 0% 100%
Lua

Lua 5.3.0 Copyright (C) 1994-2015 Lua.org, PUC-Rio

Python 3

Python 3.5.0 (default, Sep 14 2015, 09:36:50) [GCC 4.9.2] on linux