4 ms·
If anyone from Cheerp reads this, I use emscripten (https://github.com/kripken/emscripten https://github.com/kripken/emscripten) at the moment, is Cheerp any be
by pierre-renaux 12y ago
If anyone from Cheerp reads this, I use emscripten (https://github.com/kripken/emscripten https://github.com/kripken/emscripten) at the moment, is Cheerp any better ?
Specifically does it compile faster, generates a smaller final .js output, or produce "faster" code ?
- kolodny 12y agoI just ran the HelloClient.cpp from their example page [1] and the compiled file was 1.7 Mb [1] http://www.leaningtech.com/cheerp/examples/ http://www.leaningtech.com/cheerp/examples/
- mx267 12y agoEven if js files are usually delivered compressd by gzip (which is very effective on unminimized js files), we are aware of the issue and we are working on reducing output size. An integrated code minimizer is in the pipeline for release 1.1, and for the medium term we are working on an optimizer which cuts away unneeded libc++ initialization, which is preventing the dead code eliminator from pruning the non-useful libc++ code (which is a great part of that 1.7Mb). So, expect big improvements in this area! Disclaimer: I am one of Leaning Technologies founders.
- flohofwoe 12y agoI'm not from Cheerp, but it looks like the main difference is this (taken from their front page): Dynamic memory management. C++ objects are translated directly to JS objects, without the proxy of an emulated, flat memory space. Allow your applications to exploit the JavaScript VM garbage collector and co-exist with fair, on-demand memory allocation. I don't think that's a good thing though, since the reason why emscripten compiled code is fast is because it has a flat memory space and doesn't create expensive JS objects. Only advantage IMHO is that you don't need to allocate a big chunk of memory ahead of time (although I think emscripten still allows a growable heap as an option, but with a performance penalty).
- dochtman 12y agoThe Emscripten author wrote a blog post when Cheerp (then called duetto) was first announced: http://mozakai.blogspot.co.uk/2013/11/c-to-javascript-emscripten-mandreel-and.html http://mozakai.blogspot.co.uk/2013/11/c-to-javascript-emscri...
- azakai 12y agoAs far as I know that comparison is still up to date, but if the Cheerp devs are here maybe they can comment. I may do a followup post now, since Cheerp is at 1.0. Seems like a good time to do some benchmarking.