SURPR!SE
サプライズ
2016.02.16
Cheerp C++ to Javascript Compiler
When it comes to software performance, memory allocation design become one of the key feature of a solution. Cheerp is a C++ to javascript compiler that aim to keep the dynamic memory allocation of C++ while not using asm constraint. Major browsers support to emscripten focus on an optimization of the asm.js code execution once the memory mapping is successfully validated. This also means that asm-safe validated memory and cast will run faster depending on the vendor level of support. By design Cheerp doesn’t rely on asm and keep it from vendor drawback such as for instance the recent removing of memory growth at runtime in asm mode.
It is always delighting to see different approach to a same challenge. And while the main goal of both emscripten and cheerp is not to replace javascript but to allow a wide range of software to run in the browser, we may wonder or speculate if the cheerp team may have any future plan to support webassembly compilement. Note that it is already possible to pipe emscripten with binaryen to target webassembly.
Here are a few benchmark chart from the Cheerp blog: All chart ©Leaning Technologies Limited
While game engine like Unreal or Unity have already demonstrated their support to the emscripten toolchain for their HTML5 demo, we may wonder how the cheerp team plan their business model, looking at their pricing policy for professional use oppose itself to the full open-source model of emscripten.
- Cheerp Homepage
http://leaningtech.com/cheerp/ - Removing of memory growth at runtime in asm.js
https://groups.google.com/forum/m/#!topic/emscripten-discuss/09E_WEk193E