(originally published on November 14, 2017)
We are excited to announce the first public release candidate of Cheerp 2.0, our open-source C/C++ compiler for Web applications! Cheerp 2.0 is by far the most substantial update in terms of both features and performance since our initial stable release Cheerp 1.0.
We achieved two key objectives with Cheerp 2.0RC1:
Finally, thanks to extensive work on optimisations and our PreExecuter algorithm, the output of Cheerp 2.0-rc1 is on average 30% smaller than Emscripten on large benchmarks and 90% smaller on small benchmarks.
New Features of Cheerp 2.0
Thanks to a new range of attribute tags (such as
Cheerp 2.0 also introduces a new set of improved optimisation steps, targeting both improved runtime performance as well as reduced output size.
Performance was evaluated on v8 (git revision 313f8d3f) and SpiderMonkey (hg revision 613f64109bde) engines (used by Chrome and Firefox, respectively).
Compared to a native binary build, C++ compiled to WebAssembly and executed on browsers is 1.1x slower (Firefox) and 1.5x slower (Chrome).
Runtime performance is approximately 20% faster than Cheerp 1.3 due to a wealth of optimisations introduced by Cheerp 2.0.
On large-scale benchmarks, Cheerp 2.0 introduces an average 25% size reduction compared to Cheerp 1.3 due to more advanced pre-execution optimisations and further optimisations on code size reduction. A higher reduction can be expected on smaller code bases based on the impact of pre-execution.
Comparing Cheerp 2.0RC1 with Emscripten
When compiling to WebAssembly, Cheerp 2.0 features custom optimisation passes compared to Emscripten, particularly important being the PreExecuter step. As a result, WebAssembly code generated by Cheerp 2.0 is significantly smaller, and has comparable runtime performance compared to Emscripten.
Performance and Size
Traditionally, Emscripten use of asm.js and static memory meant that code compiled with it would be faster compared with Cheerp. With the introduction of WebAssembly in Cheerp 2.0 and the deprecation of asm.js, there no longer is a performance gap between Cheerp and Emscripten.
Cheerp and Emscripten have essentially equal average performance across our test suite when compiling to WebAssembly.
However, Cheerp 2.0 output is on average 30% smaller compared to Emscripten across the largest benchmarks of our suite, and 90% smaller on small benchmarks.
Getting started with Cheerp 2.0
Cheerp 2.0RC1 (Release Candidate 1) is available to download for Linux, Windows and macOS at https://leaningtech.com/cheerp/download/.
To get started with Cheerp, please visit the main GitHub project page. You will find instructions on how to download, install and use Cheerp, as well as step-by-step tutorials.
As such, Cheerp is the best technology to enable a complex, large-scale codebase to be converted to a Web application, with better performance and fewer limitations compared to alternative technologies.
Official Release — General availability (When?)
We are expecting to release at least a second release candidate for Cheerp 2.0, followed by an official Cheerp 2.0 release currently expected before the end of 2017.
Want to know more?