|
|
|
|
|
by azakai
4254 days ago
|
|
First and foremost, compiling to C++ means you then optimize it using a full C++ compiler like gcc or clang+LLVM. Not only are those compilers generally better than JITs, they can also do whole-program optimizations. JITs are getting that too (Dalvik=>ART, newer .NET runtimes), but the C and C++ compilers have a big head start. (In theory a JIT can do all the things C++ compilers do, of course.) Aside from performance, Mono must be ported to each target platform (I've heard this can take significant effort). On the other hand, well-written C++ code should just run (the rest of the engine is in C++ anyhow). edit: yes, Unity compiles C# to C++, then to JS to run in the browser. |
|