Scriptorium :scroll:

May 23, 2016 ยท View on GitHub

  • Game Scripting Languages benchmarked.
  • Using latest versions at the time of writing (Jul 2015)
  • Total solutions evaluated: 50

Results

RankLanguageFlavorTimeRelative Lua speedScore
1Cvc0.074 s.100%1808 pt
2Lualuajit0.111 s.100%1203 pt
3Terraterra0.121 s.100%1107 pt
4Cc4-jit0.136 s.100%986 pt
5Clibtcc0.151 s.100%886 pt
6Pawnpawn-asm0.384 s.100%349 pt
7Lualuajit-nojit0.521 s.100%257 pt
8Pawnpawn0.719 s.100%186 pt
9TinyVMtinyvm0.786 s.100%170 pt
10Schemechibi1.009 s.100%132 pt
11Nekonekovm1.104 s.100%121 pt
12Lualua1.341 s.100%100 pt
13Rubytinyrb(ist)1.441 s.93.0103%93 pt
14GameMonkeygamemonkey1.691 s.79.2907%79 pt
15Angelscriptangelscript-jit1.859 s.72.1132%72 pt
16Wrenwren1.997 s.67.1361%67 pt
17Lilylily2.005 s.66.8582%66 pt
18Angelscriptangelscript2.039 s.65.7295%65 pt
19Rubymruby2.098 s.63.893%63 pt
20Squirrelsquirrel2.126 s.63.0622%63 pt
21Schemes72.136 s.62.7708%62 pt
22Cc42.538 s.52.8101%52 pt
23Pythonmicropython2.842 s.47.1675%47 pt
24Daodao2.876 s.46.6166%46 pt
25QuakeCgmqcc3.060 s.43.806%43 pt
26ObjectScriptobjectscript3.108 s.43.1278%43 pt
27SGScriptsgscript4.620 s.29.0163%29 pt
28JavaJog4.675 s.28.672%28 pt
29JetScriptJetScript4.810 s.27.8671%27 pt
30Lispminilisp6.951 s.19.2855%19 pt
31Lisparia8.010 s.16.7366%16 pt
32JavaScriptduktape9.544 s.14.0463%14 pt
33Tcljim12.280 s.10.9162%10 pt
34GMLgml16.443 s.8.15268%8 pt
35MiniSchemeMiniScheme17.345 s.7.72839%7 pt
36PSLpsl17.645 s.7.59738%7 pt
37Pythontinypy(panda)21.799 s.6.14937%6 pt
38Schemes933.160 s.4.04257%4 pt
39CpicoC36.625 s.3.66016%3 pt
40JX9jx943.598 s.3.07476%3 pt
41PHPph746.029 s.2.91235%2 pt
42JTCjtc47.021 s.2.8509%2 pt
43JavaScriptv751.940 s.2.58089%2 pt
44Schemetinyscheme65.398 s.2.04979%2 pt
45Lispparen72.901 s.1.83883%1 pt
46Lisplispy9091.767 s.1.46079%1 pt
47Tclpicol151.527 s.0.884674%0 pt
48ChaiScriptchaiscript175.038 s.0.765845%0 pt
49JavaScript42tiny-js227.170 s.0.590096%0 pt
50Tcllil555.976 s.0.241111%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.

Language requirements

  • 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.

Test requirements

  • 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

Upcoming (soon)

  • 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)
    • ...
  • }

To evaluate (someday... maybe)

License

  • initial tests by Lewis Van Winkle (2009) (Public Domain)
  • makefiles, bench code, compilation fixes & most tests put into public domain (@r-lyeh)