The Computer Language
Benchmarks Game

Lua programs versus Java

by benchmark task performance

pidigits
source secs mem gz cpu cpu load
Lua 1.94 3,248 479 1.93 1% 1% 1% 99%
Java 3.06 31,088 938 3.16 0% 3% 9% 92%
regex-dna
source secs mem gz cpu cpu load
Lua 30.17 250,332 596 30.15 100% 1% 1% 0%
Java 4.26 667,416 1085 11.69 59% 69% 90% 59%
reverse-complement
source secs mem gz cpu cpu load
Lua 17.44 740,584 553 17.43 100% 1% 1% 0%
Java 1.11 345,308 1661 2.44 33% 58% 54% 80%
n-body
source secs mem gz cpu cpu load
Lua 389.29 1,176 1193 389.20 0% 1% 1% 100%
Java 21.50 27,240 1489 21.52 1% 1% 100% 0%
fasta
source secs mem gz cpu cpu load
Lua 45.92 2,828 1052 45.90 100% 1% 1% 0%
Java 2.14 36,192 2457 5.68 71% 58% 62% 77%
k-nucleotide
source secs mem gz cpu cpu load
Lua 182.12 572,508 613 180.68 1% 100% 1% 1%
Java 8.02 467,004 1802 25.57 76% 98% 73% 74%
mandelbrot
source secs mem gz cpu cpu load
Lua 201.89 23,560 623 696.14 84% 94% 85% 83%
Java 5.89 89,504 796 23.08 98% 98% 98% 99%
binary-trees
source secs mem gz cpu cpu load
Lua 418.26 1,716,904 446 417.72 21% 13% 68% 1%
Java 11.52 643,924 889 40.54 89% 92% 85% 89%
spectral-norm
source secs mem gz cpu cpu load
Lua 180.25 2,628 329 180.20 100% 1% 1% 0%
Java 4.29 31,428 950 16.56 97% 96% 98% 97%
fannkuch-redux
source secs mem gz cpu cpu load
Lua 1,315.48 1,284 462 1,315.20 53% 0% 47% 0%
Java 17.74 30,048 1282 69.90 98% 98% 100% 99%
Lua

Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio

Java

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)