3 ms·
It originally had a very unique approach, it would JIT the emulated instructions into .NET bytecode and then let the .NET runtime JIT that into native code. At
by jsheard 3y ago
It originally had a very unique approach, it would JIT the emulated instructions into .NET bytecode and then let the .NET runtime JIT that into native code. At some point they switched over to their own bespoke JIT-to-native engine for more control though.
- whizzter 3y agoI'm also using the dynamic code-loading to get free JIT in other projects and quite a few features of .NET relies on that, there are limitations (and for something as dynamic as an emulator I'm not at all surprised that they hit a brick wall at some point). Another benefit of C# is that they continually add features to make the language less susceptible to GC stalls. Compared to Java you have Value types, real generics, ref and out arguments, Span<T> types, stackalloc allocations, unsafe blocks and so on. You can get quite far without allocating anything on the heap and the ergonomics won't be that much worse than even C++ when doing so.