Cheerp – A C/C++ compiler for web applications
leaningtech.com
Cheerp – A C/C++ compiler for web applications
1–10 of 54 posts
Re: Cheerp – A C/C++ compiler for web applications
#2Re: Cheerp – A C/C++ compiler for web applications
#3I wonder what advantages choosing C++ to write web apps would bring. At the end of the day it's all JavaScript so performance is rather moot point.
Re: Cheerp – A C/C++ compiler for web applications
#4I wonder what advantages choosing C++ to write web apps would bring. At the end of the day it's all JavaScript so performance is rather moot point.
Re: Cheerp – A C/C++ compiler for web applications
#5Specifically does it compile faster, generates a smaller final .js output, or produce "faster" code ?
Re: Cheerp – A C/C++ compiler for web applications
#6I wonder what advantages choosing C++ to write web apps would bring. At the end of the day it's all JavaScript so performance is rather moot point.
Re: Cheerp – A C/C++ compiler for web applications
#7Re: Cheerp – A C/C++ compiler for web applications
#8Re: Cheerp – A C/C++ compiler for web applications
#9I wonder what advantages choosing C++ to write web apps would bring. At the end of the day it's all JavaScript so performance is rather moot point.
That's probably true, but C++ does provide very powerful compile-time evaluation mechanisms like templates, constexpr (compile-time evaluated constants and functions), and template metaprogramming. That being said, compile-time C++ can look very gross since most of the features are accidental.
However, there are a lot of huge performance benefits to moving computation to compile time: selecting the most optimal algorithm for a type, guaranteeing you don't mismatch your units, precompiling search (glob, regex) engines, eliminating dead code, and so on.
So I would be shocked if at least some javascript applications couldn't be much faster and more correct by writing in C++ first and compiling to js. That being said, it's probably not in scope for a minimum-viable product, so improving already business-critical parts of the code base might be the best place to start.
Re: Cheerp – A C/C++ compiler for web applications
#10I wonder what advantages choosing C++ to write web apps would bring. At the end of the day it's all JavaScript so performance is rather moot point.
That's actually not true. Emscripten compiles to code that is much faster than hand-written JavaScript. In this case they are not using Emscripten or a similar technique but are compiling to regular old JavaScript, so performance probably is the same, rather this might be for people who just like C++, like what GWT is for Java devs.