The Computer Language
Benchmarks Game

Lua versus Java fastest programs

by faster benchmark performance

n-body
source secs mem gz cpu cpu load
Lua 394.85 1,396 1305 394.77 0% 6% 94% 1%
Java 22.00 32,272 1489 22.07 1% 0% 0% 100%
k-nucleotide
source secs mem gz cpu cpu load
Lua 182.10 588,696 613 181.16 1% 1% 99% 1%
Java 8.74 470,116 1812 27.12 71% 73% 93% 74%
fasta
source secs mem gz cpu cpu load
Lua 51.55 2,964 1061 51.54 0% 98% 2% 0%
Java 2.32 42,212 2473 6.30 65% 85% 47% 76%
reverse-complement
source secs mem gz cpu cpu load
Lua 76.95 2,932,820 553 74.20 1% 41% 60% 1%
Java 3.32 609,712 2183 7.54 64% 44% 44% 76%
mandelbrot
source secs mem gz cpu cpu load
Lua 261.54 22,740 623 893.50 80% 84% 85% 97%
Java 6.96 76,316 796 27.06 97% 97% 97% 97%
spectral-norm
source secs mem gz cpu cpu load
Lua 192.71 2,712 329 192.66 10% 0% 0% 91%
Java 4.26 33,572 950 16.39 96% 96% 98% 95%
binary-trees
source secs mem gz cpu cpu load
Lua 469.26 2,277,664 412 468.76 61% 38% 1% 4%
Java 8.39 960,056 835 27.39 81% 85% 74% 90%
fannkuch-redux
source secs mem gz cpu cpu load
Lua 1,407.04 1,404 462 1,406.73 75% 0% 1% 25%
Java 17.98 31,180 1282 70.57 97% 99% 97% 99%
regex-redux
source secs mem gz cpu cpu load
Lua   Bad Output
Java 2.67 39,376 929 2.01 37% 21% 51% 37%
pidigits
source secs mem gz cpu cpu load
Lua   Failed
Java 2.60 ? 938 ? 27% 26% 28% 38%
Lua

Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio

Java

openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)