The Computer Language
Benchmarks Game

Erlang versus Java fastest programs

Always look at the source code.

These are only the fastest programs. Do some of them use manually vectorized SIMD? Look at the other programs. They may seem more-like a fair comparison to you.

binary-trees
source secs mem gz busy cpu load
Erlang 5.19 419,540 478 15.94 71% 74% 81% 81%
Java 2.48 1,722,848 835 7.88 98% 75% 71% 74%
regex-redux
source secs mem gz busy cpu load
Erlang 36.11 3,894,284 1048 55.97 21% 25% 38% 70%
Java 5.58 985,696 929 18.26 81% 77% 84% 85%
fannkuch-redux
source secs mem gz busy cpu load
Erlang 72.42 36,916 1038 288.18 99% 99% 100% 100%
Java 10.64 35,192 1282 41.91 99% 98% 99% 97%
spectral-norm
source secs mem gz busy cpu load
Erlang 11.49 47,708 747 45.25 98% 98% 98% 99%
Java 1.63 39,304 756 6.22 95% 97% 95% 95%
pidigits
source secs mem gz busy cpu load
Erlang 7.74 51,716 562 9.23 52% 10% 49% 8%
Java 0.93 36,552 764 0.98 2% 3% 1% 99%
mandelbrot
source secs mem gz busy cpu load
Erlang 44.66 67,152 792 178.29 100% 100% 100% 100%
Java 4.15 69,136 796 16.29 98% 99% 98% 99%
n-body
source secs mem gz busy cpu load
Erlang 100.57 37,616 1399 101.23 0% 100% 0% 0%
Java 6.74 35,844 1489 6.82 1% 100% 1% 0%
k-nucleotide
source secs mem gz busy cpu load
Erlang 74.78 867,508 937 212.13 58% 62% 68% 96%
Java 4.98 356,904 1812 16.25 78% 76% 96% 76%
fasta
source secs mem gz busy cpu load
Erlang 20.18 37,368 1164 21.56 1% 100% 3% 3%
Java 1.21 44,620 2543 3.58 89% 75% 65% 68%
reverse-complement
source secs mem gz busy cpu load
Erlang 160.43 5,740,024 630 172.96 40% 13% 27% 28%
Java 1.54 670,924 2183 3.51 46% 56% 48% 79%
Erlang

Erlang/OTP 24 [erts-12.0] [source] [64-bit]
[smp:4:4] [ds:4:4:10] [async-threads:1] [jit]

Java

openjdk 16 2021-03-16
OpenJDK Runtime Environment (build 16+36-2231)
OpenJDK 64-Bit Server VM (build 16+36-2231, mixed mode, sharing)