The Computer Language
Benchmarks Game

Lua versus Java fastest programs

by faster benchmark performance

n-body
source secs mem gz cpu cpu load
Lua 404.83 1,404 1305 404.76 0% 98% 3% 0%
Java 22.00 32,496 1489 22.07 1% 100% 0% 1%
k-nucleotide
source secs mem gz cpu cpu load
Lua 184.25 513,992 613 183.19 81% 1% 1% 20%
Java 8.66 385,768 1812 26.52 76% 81% 74% 76%
fasta
source secs mem gz cpu cpu load
Lua 50.08 2,920 1061 50.06 0% 7% 94% 0%
Java 2.32 42,556 2473 6.24 73% 85% 49% 63%
reverse-complement
source secs mem gz cpu cpu load
Lua 75.98 2,943,804 553 75.07 53% 4% 2% 58%
Java 3.31 626,956 2183 7.44 56% 60% 83% 45%
mandelbrot
source secs mem gz cpu cpu load
Lua 250.10 22,652 623 779.68 100% 72% 74% 67%
Java 6.96 76,748 796 27.07 98% 98% 96% 98%
spectral-norm
source secs mem gz cpu cpu load
Lua 193.27 2,848 329 193.24 0% 0% 0% 100%
Java 4.27 32,960 950 16.41 95% 97% 98% 96%
binary-trees
source secs mem gz cpu cpu load
Lua 452.53 2,294,260 412 452.07 18% 1% 2% 82%
Java 8.28 982,224 835 27.19 79% 86% 83% 83%
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.91 31,560 1282 70.25 99% 98% 99% 97%
regex-redux
source secs mem gz cpu cpu load
Lua   Bad Output
Java 0.57 39,944 929 1.71 84% 63% 72% 81%
pidigits
source secs mem gz cpu cpu load
Lua   Failed
Java 0.26 912 938 0.33 0% 31% 77% 27%
Lua

Lua 5.3.4 Copyright (C) 1994-2017 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)