Benchmarks of several script languages found on github. Only the execution time of the Recursive Fibonacci function was used in the comparaison.
The matab version of the fib function is :
function y = fib(n)
if (n<2)
y=n;
else
y=fib(n-1)+fib(n-2);
fib(36) = 14930352.
The tests were made on Win10 64 bits Desktop with Intel i7-8700 CPU @ 3.2 GHz and 16 GB of RAM. Linux ( Ubuntu 18.04.2 LTS, bionic) was installed under Windows from the MicroSoft Store
The projects were compiled with:
- Linux gcc v7.4 (using LLVM-3.9, LLVM-6.0 or LLVM-8.0 was required). Flag -O3 was used in all projects.
- Win: Visual Studio 2019, target x64, optimization Flag /O2
Script Language | Win64/Linux | Execution time of Fib(36) in seconds |
---|---|---|
C executable with gcc-7.3 | Linux | 0.03 |
C executable with VS 2019 | Win | 0.065 |
calc4 w LLVM JIT | Linux | 0.06 |
nickel w LLVM JIT | Linux | 0.09 |
vaiven w ASMJIT | Linux | 0.09 |
tourmaline w LLVM JIT | Linux | 0.09 |
exolang w LLVM JIT | Linux | 0.1 |
leekscript w LLVM JIT | Linux | 0.1 |
luajit 2.1.0-beta3 w DYNASM | Linux | 0.12 |
tuplex w LLVM | Linux | 0.12 |
liquid w LLVM JIT | Linux | 0.14 |
shlc w LLVM JIT | Linux | 0.14 |
floyd w LLVM | Linux | 0.14 |
BeRoScript | Win32-Delphi | 0.17 |
Stackjit | Linux | 0.2 |
nodejs v8.10.0 (from ubuntu distr) | Linux | 0.4 |
am-lang | Win | 0.5 |
yaz_vm | Linux | 0.5 |
am-lang | Linux | 0.55 |
yaz_vm | Win | 0.6 |
dash | Win | 0.7 |
ravi | Win | 0.85 |
Matlab2018b (2nd run) | Win | 0.85 |
berry | Linux | 0.9 |
berry | Win | 1 |
fin | Linux | 1 |
Tagha | Linux | 1.1 |
fin | Win | 1.2 |
rubi w JIT | Win32 | 1.3 |
badgerscript | Linux | 1.4 |
Killa | Linux | 1.4 |
clox | Linux | 1.4 |
lily | Linux | 1.4 |
badgerscript | Win | 1.6 |
lily | Win | 1.6 |
PL0-Compiler | Linux | 1.6 |
c4 | Linux | 1.7 |
fake w -jit | Win | 1.7 |
golem | Linux | 1.7 |
Lua 5.2.4 (from ubuntu distr) | Linux | 1.7 |
wren | Linux | 1.7 |
PL0-Compiler | Win | 1.8 |
useless | Linux | 1.8 |
loxx | Linux | 1.9 |
janet | Linux | 2 |
gmscript | Win | 2.3 |
p++ | Win | 2.4 |
loxx | Win | 2.6 |
llamavm | Linux | 2.7 |
mruby | Linux | 2.7 |
lunatic | Linux | 2.8 |
fake no jit | Win | 2.9 |
janet | Win | 2.9 |
JetScript | Win | 3 |
llamavm | Win | 3 |
Matlab2018b (1st run) | Win | 3.1 |
ink-ivm | Linux | 3.2 |
p++ | Linux | 3.2 |
mujs | Linux | 3.5 |
poca | Win32-Delphi | 3.8 |
KernScript | Linux | 3.9 |
nickel no jit | Linux | 4.3 |
gravity | Linux | 4.7 |
moon-lang | Linux | 4.8 |
JetScript | Linux | 5.2 |
luna | Linux | 5.7 |
KernScript | Win | 5.9 |
strawberry | Linux | 6 |
VCL | Linux | 6.3 |
luna | Win | 6.6 |
yasl | Linux | 7.3 |
rho | Linux | 8.5 |
gravity | Win | 9 |
aria | Linux | 9 |
IFJ-14-Pascal | Linux | 9.8 |
Ark | Linux | 10.4 |
pl0c | Linux | 11.2 |
lox | Linux | 11.7 |
smudge | Linux | 12.4 |
besen | Win32-Delphi | 13.4 |
pure | Linux | 14 |
P - Pascal | Linux | 14.5 |
- JIT boosts performances w.r.t register or stack based Virtual Machine.
- gcc-7/g++-7 -O3 produce often executable which is faster than that produced by VS2019.