The Computer Language
Benchmarks Game

Lua programs versus Java

by benchmark task performance

pidigits
source secs KB gz cpu cpu load
Lua 2.76 2,996 414 2.75 0% 1% 1% 100%
Java 4.14 25,988 938 4.13 1% 1% 0% 100%
regex-dna
source secs KB gz cpu cpu load
Lua 31.27 340,104 596 31.26 0% 1% 1% 100%
Java 22.35 623,244 740 22.34 1% 1% 0% 100%
k-nucleotide
source secs KB gz cpu cpu load
Lua 242.46 724,636 613 242.00 0% 1% 1% 100%
Java 47.14 516,280 1602 47.10 1% 1% 1% 100%
spectral-norm
source secs KB gz cpu cpu load
Lua 350.86 1,100 329 350.78 1% 0% 1% 100%
Java 16.30 23,872 950 16.29 1% 0% 1% 100%
n-body
source secs KB gz cpu cpu load
Lua 594.46 872 1305 594.32 0% 0% 1% 100%
Java 24.07 23,184 1430 24.06 1% 1% 1% 100%
binary-trees
source secs KB gz cpu cpu load
Lua 482.57 1,035,484 446 481.98 0% 1% 1% 100%
Java 16.53 511,692 584 16.51 1% 1% 0% 100%
mandelbrot
source secs KB gz cpu cpu load
Lua 1,039.59 18,044 623 1,039.32 0% 1% 1% 100%
Java 27.41 55,556 796 27.40 1% 0% 1% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Lua 2,593.59 820 462 2,593.04 1% 0% 1% 100%
Java 67.56 23,480 1282 67.53 1% 1% 1% 100%
fasta-redux
source secs KB gz cpu cpu load
  No program contribute your program
Java 0.19 ? 1443 0.18 0% 0% 0% 100%
fasta
source secs KB gz cpu cpu load
Lua   Failed
Java 0.22 476 1507 0.22 0% 9% 0% 100%
reverse-complement
source secs KB gz cpu cpu load
Lua   Failed
Java 0.23 456 745 0.22 0% 0% 4% 100%
Lua

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

Java

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