The Computer Language
Benchmarks Game

Lua programs versus Python 3

by benchmark task performance

n-body
source secs mem gz cpu cpu load
Lua 404.83 1,404 1305 404.76 0% 98% 3% 0%
Python 3 838.39 10,324 1196 838.20 95% 1% 5% 0%
fasta
source secs mem gz cpu cpu load
Lua 50.08 2,920 1061 50.06 0% 7% 94% 0%
Python 3 59.47 15,996 1947 138.97 55% 55% 63% 66%
spectral-norm
source secs mem gz cpu cpu load
Lua 193.27 2,848 329 193.24 0% 0% 0% 100%
Python 3 180.97 15,876 443 720.51 100% 100% 100% 100%
mandelbrot
source secs mem gz cpu cpu load
Lua 250.10 22,652 623 779.68 100% 72% 74% 67%
Python 3 225.24 15,736 688 899.25 100% 100% 100% 100%
k-nucleotide
source secs mem gz cpu cpu load
Lua 184.25 513,992 613 183.19 81% 1% 1% 20%
Python 3 77.65 182,700 1967 302.86 97% 99% 97% 98%
fannkuch-redux
source secs mem gz cpu cpu load
Lua 1,383.93 1,460 462 1,383.69 0% 100% 1% 0%
Python 3 565.97 15,528 950 2,172.63 95% 94% 95% 100%
binary-trees
source secs mem gz cpu cpu load
Lua 468.12 2,312,236 412 467.62 59% 1% 1% 42%
Python 3 93.55 280,624 589 337.74 92% 89% 87% 93%
reverse-complement
source secs mem gz cpu cpu load
Lua 17.55 739,380 553 17.53 0% 1% 100% 0%
Python 3 3.26 264,596 814 4.67 18% 99% 1% 26%
regex-redux
source secs mem gz cpu cpu load
Lua   Bad Output
Python 3 0.62 15,968 512 0.64 24% 65% 8% 11%
pidigits
source secs mem gz cpu cpu load
Lua   Failed
Python 3 0.34 836 386 0.30 0% 3% 0% 100%
Lua

Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio

Python 3

Python 3.6.3