The Computer Language
Benchmarks Game

Lua programs versus Java

by benchmark task performance

pidigits
secs KB gz cpu cpu load
Lua 2.76 2,996 414 2.75 0% 1% 1% 100%
Java 4.14 26,616 938 4.14 2% 0% 1% 100%
regex-dna
secs KB gz cpu cpu load
Lua 31.27 340,104 596 31.26 0% 1% 1% 100%
Java 20.80 567,404 1284 20.79 0% 0% 1% 100%
k-nucleotide
secs KB gz cpu cpu load
Lua 242.46 724,636 613 242.00 0% 1% 1% 100%
Java 33.48 1,190,032 1844 33.44 1% 1% 0% 100%
spectral-norm
secs KB gz cpu cpu load
Lua 350.86 1,100 329 350.78 1% 0% 1% 100%
Java 16.37 26,876 950 16.36 1% 1% 0% 100%
n-body
secs KB gz cpu cpu load
Lua 594.46 872 1305 594.32 0% 0% 1% 100%
Java 24.33 24,036 1424 24.32 1% 0% 0% 100%
mandelbrot
secs KB gz cpu cpu load
Lua 1,039.59 18,044 623 1,039.32 0% 1% 1% 100%
Java 27.19 88,448 796 27.18 1% 0% 1% 100%
fannkuch-redux
secs KB gz cpu cpu load
Lua 2,593.59 820 462 2,593.04 1% 0% 1% 100%
Java 67.66 26,644 1282 67.63 1% 1% 0% 100%
binary-trees
secs KB gz cpu cpu load
Lua 482.57 1,035,484 446 481.98 0% 1% 1% 100%
Java 10.70 518,220 926 10.68 1% 1% 0% 100%
fasta-redux
secs KB gz cpu cpu load
  No program contribute your program
Java 0.22 476 1443 0.21 0% 5% 0% 100%
reverse-complement
secs KB gz cpu cpu load
Lua   Failed
Java 0.25 472 745 0.25 0% 4% 8% 100%
fasta
secs KB gz cpu cpu load
Lua   Failed
Java 0.28 772 1507 0.28 0% 0% 4% 100%
Lua

Lua 5.3.0 Copyright (C) 1994-2015 Lua.org, PUC-Rio

Java

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) Server VM (build 25.45-b02, mixed mode)