4 ms·
> Choose between running directly using the convenient JIT, or compilation to C++ for extra speed. C++ is an odd compilation target. Usually it's just C. I'd b
by 90s_dev 1y ago
> Choose between running directly using the convenient JIT, or compilation to C++ for extra speed.
C++ is an odd compilation target. Usually it's just C. I'd be curious to see what kind of C++ it emits, and whether the techniques it uses would be better exported as C++ libraries than a new language on top of C++.
- zem 1y agocompiling to c++ has the possibility of interop with c++ libraries, without being tied to c++ as a language. that's really hard to do any other way.
- Aardappel 1y agoAll the VM runtime functions are written in C++, as are all of the built-in functionality and the engine it uses. To use C, either all of that needs to be rewritten in C, or there needs to be a clear layer between the two, but the API surface is fairly big. It actually uses C for the JIT (libtcc), but the fact it has to go thru a layer is a source of slowness and complication.