- Game Scripting Languages benchmarked.
- Using latest versions at the time of writing (Jul 2015)
- Total solutions evaluated: 50
Rank | Language | Flavor | Time | Relative Lua speed | Score |
---|---|---|---|---|---|
1 | C | vc | 0.074 s. | 1808 pt | |
2 | Lua | luajit | 0.111 s. | 1203 pt | |
3 | Terra | terra | 0.121 s. | 1107 pt | |
4 | C | c4-jit | 0.136 s. | 986 pt | |
5 | C | libtcc | 0.151 s. | 886 pt | |
6 | Pawn | pawn-asm | 0.384 s. | 349 pt | |
7 | Lua | luajit-nojit | 0.521 s. | 257 pt | |
8 | Pawn | pawn | 0.719 s. | 186 pt | |
9 | TinyVM | tinyvm | 0.786 s. | 170 pt | |
10 | Scheme | chibi | 1.009 s. | 132 pt | |
11 | Neko | nekovm | 1.104 s. | 121 pt | |
12 | Lua | lua | 1.341 s. | 100 pt | |
13 | Ruby | tinyrb(ist) | 1.441 s. | 93 pt | |
14 | GameMonkey | gamemonkey | 1.691 s. | 79 pt | |
15 | Angelscript | angelscript-jit | 1.859 s. | 72 pt | |
16 | Wren | wren | 1.997 s. | 67 pt | |
17 | Lily | lily | 2.005 s. | 66 pt | |
18 | Angelscript | angelscript | 2.039 s. | 65 pt | |
19 | Ruby | mruby | 2.098 s. | 63 pt | |
20 | Squirrel | squirrel | 2.126 s. | 63 pt | |
21 | Scheme | s7 | 2.136 s. | 62 pt | |
22 | C | c4 | 2.538 s. | 52 pt | |
23 | Python | micropython | 2.842 s. | 47 pt | |
24 | Dao | dao | 2.876 s. | 46 pt | |
25 | QuakeC | gmqcc | 3.060 s. | 43 pt | |
26 | ObjectScript | objectscript | 3.108 s. | 43 pt | |
27 | SGScript | sgscript | 4.620 s. | 29 pt | |
28 | Java | Jog | 4.675 s. | 28 pt | |
29 | JetScript | JetScript | 4.810 s. | 27 pt | |
30 | Lisp | minilisp | 6.951 s. | 19 pt | |
31 | Lisp | aria | 8.010 s. | 16 pt | |
32 | JavaScript | duktape | 9.544 s. | 14 pt | |
33 | Tcl | jim | 12.280 s. | 10 pt | |
34 | GML | gml | 16.443 s. | 8 pt | |
35 | MiniScheme | MiniScheme | 17.345 s. | 7 pt | |
36 | PSL | psl | 17.645 s. | 7 pt | |
37 | Python | tinypy(panda) | 21.799 s. | 6 pt | |
38 | Scheme | s9 | 33.160 s. | 4 pt | |
39 | C | picoC | 36.625 s. | 3 pt | |
40 | JX9 | jx9 | 43.598 s. | 3 pt | |
41 | PHP | ph7 | 46.029 s. | 2 pt | |
42 | JTC | jtc | 47.021 s. | 2 pt | |
43 | JavaScript | v7 | 51.940 s. | 2 pt | |
44 | Scheme | tinyscheme | 65.398 s. | 2 pt | |
45 | Lisp | paren | 72.901 s. | 1 pt | |
46 | Lisp | lispy90 | 91.767 s. | 1 pt | |
47 | Tcl | picol | 151.527 s. | 0 pt | |
48 | ChaiScript | chaiscript | 175.038 s. | 0 pt | |
49 | JavaScript | 42tiny-js | 227.170 s. | 0 pt | |
50 | Tcl | lil | 555.976 s. | 0 pt |
- AMD A10 3.8 GHz, 8 GiB, Windows 7 64bit.
- Compiled on VS2015 RC if possible, VS2013 elsewhere.
- Take it with a grain of salt.
- must embed from C++.
- must be self-contained (no BOOST, no LLVM backends).
- must compile on vs2015 (or vs2013 at least).
- must link statically.
- must not require (heavy) makefiles/cygwin/build-systems to build.
- must use jit/optimizations if available.
- must compare fair between languages. for example:
- must not use yield/coroutines on recursive fibonacci test.
- must disable threading if possible (not all languages are thread-safe)
- etc
- creating a class to handle them all (relevant)
- @todo {
- add exe size
- add iteration benchmarks
- add string benchmarks
- add script->native round trip
- add native->script round trip
- add memory consumption
- add memory leaks
- add time to set up
- add final thoughts
- also, create a score chart, based on:
- small
- clean
- type (interpreted/bytecode/jit)
- fast
- containers
- OO
- closures
- bindings
- 32/64bit
- threading
- thread-safety
- coroutines/greenlets
- debug capabilities
- zero-configuration based (drag-n-drop files on solution/project)
- ...
- }
- http://catpad.net/michael/jvm/
- http://jamvm.sourceforge.net/
- https://oss.readytalk.com/avian/
- https://qore.org/downloads ?
- http://www.codeproject.com/Articles/24029/Home-Made-Java-Virtual-Machine
- http://www.harbaum.org/till/nanovm/index.shtml
- http://www.kiffer.be/open-mika.html
- https://code.google.com/archive/p/tart
- https://github.com/aardappel/lobster
- https://github.com/andyfischer/circa
- https://github.com/chameco/Solid
- https://github.com/clever-lang/clever
- https://github.com/evanw/skew
- https://github.com/ex/Killa
- https://github.com/gregtour/duck-lang
- https://github.com/H2CO3/Sparkling
- https://github.com/JarrettBillingsley/Croc
- https://github.com/jeorgun/Vivaldi
- https://github.com/kimtg/arcadia
- https://github.com/kimtg/ToyLisp
- https://github.com/LukasBanana/XieXie-2
- https://github.com/nim-lang/Nim (or https://github.com/nim-lang/csources)
- https://github.com/noct/expr
- https://github.com/parrot/parrot
- https://github.com/perl11/potion
- https://github.com/proglangclass/vm
- https://github.com/red/red
- https://github.com/scross99/locic
- https://github.com/stevedekorte/io
- https://github.com/timburks/nu
- https://github.com/zeux/aike
- https://github.com/dotnet/coreclr
- http://www.mono-project.com/
- https://en.wikipedia.org/wiki/P-code
- http://www.dwheeler.com/6502/oneelkruns/qforth.html
- https://robovm.com/
- http://www.lejos.org/ (or http://tinyvm.sourceforge.net/)
- http://dmitry.gr/index.php?r=05.Projects&proj=12.%20uJ%20-%20a%20micro%20JVM
- https://github.com/dartino/sdk
- https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledCPlusPlus
- https://github.com/NETMF/netmf-interpreter
- initial tests by Lewis Van Winkle (2009) (Public Domain)
- makefiles, bench code, compilation fixes & most tests put into public domain (@r-lyeh)