Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Related: for all the flak GC gets, C# was used to produce two amazing emulators:

1) https://github.com/Ryujinx/Ryujinx

2) https://github.com/TASEmulators/BizHawk



ryujinx doesn't use the GC for their sub-systems, they use a mix of manual memory allocations throught their allocators or RC

For such project to succeed, you have to be able to optimize your memory allocation strategy

If you just rely on the GC, you'll have bad surprises (why does my game stutter during gameplay?!), they already have multiple due to their double dip on the JIT, nothing prevents the JIT compiler to compile during your gameplay, causing massive stutters, just like how shaders compilation is an issue at runtime


Personally I think C# is a great language to get stuff done. The big problem it has is the portability (especially when it comes to using it with a GUI).


Fwiw, ryujinx uses a jit on the hot path, and most (but not all!) bizhawk cores are not actually c#.


Ryujinx uses Microsoft's JIT .NET technology [1] which is best available for C# codebases. Nothing new here since it needs to translate Switch's ARM instructions to x86 machine code somehow.

[1] https://devblogs.microsoft.com/dotnet/the-ryujit-transition-...


GC often gets more flak than is deserved.

Often such flak ignores the differences between throughput and latency.

For long, lived processes you’ll end up writing some kind of garbage collection system.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: