Haxe, Dart, Typescript, and Webassembly, javascript output performances comparison.
An updated comparison from https://web.archive.org/web/20171104160438/http://www.infognition.com/blog/2014/comparing_flash_haxe_dart_asmjs_and_cpp.html
npm install
npm run build
To run the benchmark open one of this urls in your browser :
- Haxe : https://damoebius.github.io/HaxeBench/www/spihaxejs.html
- TypeScript : https://damoebius.github.io/HaxeBench/www/spitsjs.html
- Dart : https://damoebius.github.io/HaxeBench/www/spidart.html
- Wasm : https://damoebius.github.io/HaxeBench/www/asmjs.html
On Chrome 70 and Firefox 63, i5-5300U CPU @ 2.30GHz, 200 passes
lang | compilation time | chrome run time | firefox run time | size | minified size |
---|---|---|---|---|---|
Haxe | 0.22s | 6.76s | 8.15s | 27KB* | 13KB |
TypeScript | 2.79s | 7.86s | 8.46s | 12KB | 7KB |
Dart | 5.38s | 9.137s | 8.8s | 98KB | 89KB |
Wasm | 8.74s | 6.8s | 5.93s | 82KB** | 69KB |
On Chrome 66 and Firefox 59, i5-5300U CPU @ 2.30GHz, 200 passes
lang | compilation time | chrome run time | firefox run time | size | minified size |
---|---|---|---|---|---|
Haxe | 0.281s | 7.97s | 7.18s | 27KB* | 13KB |
TypeScript | 1.97s | 8.94s | 8.15s | 12KB | 7KB |
Dart | 5.56s | 11.418s | 9.241s | 344KB | 136KB |
Dart2 | 4.06s | 11.411s | 9.206s | 264KB | 106KB |
Wasm | 8.74s | 7.176s | 5.93s | 82KB** | 69KB |
*includes typed arrays polyfills for old browsers.
** wasm 23KB + javascript 59KB