The Computer Language
Benchmarks Game

Lua programs versus Java

by benchmark task performance

reverse-complement
source secs mem gz cpu cpu load
Lua 17.55 739,380 553 17.53 0% 1% 100% 0%
Java 1.03 191,064 2183 2.31 52% 57% 43% 74%
n-body
source secs mem gz cpu cpu load
Lua 404.83 1,404 1305 404.76 0% 98% 3% 0%
Java 22.10 33,136 1429 22.20 31% 1% 1% 70%
k-nucleotide
source secs mem gz cpu cpu load
Lua 184.25 513,992 613 183.19 81% 1% 1% 20%
Java 8.70 375,568 1812 27.17 80% 72% 74% 88%
fasta
source secs mem gz cpu cpu load
Lua 50.08 2,920 1061 50.06 0% 7% 94% 0%
Java 2.33 43,924 2473 6.07 53% 71% 63% 74%
mandelbrot
source secs mem gz cpu cpu load
Lua 250.10 22,652 623 779.68 100% 72% 74% 67%
Java 6.04 76,528 796 23.34 98% 97% 97% 97%
spectral-norm
source secs mem gz cpu cpu load
Lua 193.27 2,848 329 193.24 0% 0% 0% 100%
Java 4.23 34,472 950 16.27 96% 97% 97% 96%
binary-trees
source secs mem gz cpu cpu load
Lua 468.12 2,312,236 412 467.62 59% 1% 1% 42%
Java 8.34 893,008 835 28.20 87% 79% 96% 81%
fannkuch-redux
source secs mem gz cpu cpu load
Lua 1,383.93 1,460 462 1,383.69 0% 100% 1% 0%
Java 17.26 32,116 1282 67.75 98% 99% 97% 99%
regex-redux
source secs mem gz cpu cpu load
Lua   Bad Output
Java 0.62 45,052 929 1.84 86% 66% 72% 75%
pidigits
source secs mem gz cpu cpu load
Lua   Failed
Java 0.31 1,868 938 0.37 27% 14% 19% 72%
Lua

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

Java

java 9.0.1
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)