4 ms·
Impressive! Is this the first modern console emulator written in a GCed language, or even a language other than C++?
by Cyph0n 6y ago
Impressive! Is this the first modern console emulator written in a GCed language, or even a language other than C++?
- pjmlp 6y agoNope, https://hackaday.com/2018/08/07/even-the-playstation-2-cant-escape-java/ https://hackaday.com/2018/08/07/even-the-playstation-2-cant-...
- whoisthemachine 6y agoThat's Java running on a console, not Java emulating a console.
- monocasa 6y agoThere were a slew of older JITing PSP emulators when it came out using C# that had modern architectures. It's a cute technique to bootstrap a JIT, using a JIT runime that people already can be expected to have. pspplayer might have been the first? I could be wrong there
- Orphis 6y agoI worked on Jpcsp a long time ago, PSP emulator in Java. It was the first emulator to manage to run a large amount of games. We had some crazy devs on it who even wrote a MIPS to Java bytecode JIT. It worked great... sometimes. We ended up running into lots of JIT issues as some patterns were unusual and not always properly handled by hotspot. Fun times!
- anthk 6y agoWould graalvm give a speed boost?
- p1necone 6y agoThe problems with GC'd languages are very exaggerated. I'm not surprised at all that this is performant in C#.
- userbinator 6y agoIt's mainly the horrible "enterprise" culture around them, which leads to ridiculous abstraction bloat and the associated increase in resource consumption.
- Cyph0n 6y agoFor game dev (and emulators!), the non-deterministic behavior of GCs can cause a lot of trouble, mainly because you have a fixed frame budget. That’s why it’s usually easier to just use a language where you can finely control when and where allocations take place. I’m sure there are techniques to work around this, but you’d then usually have to leave behind the “idiomatic” area of the language you’re using.
- rafaelvasco 6y agoYes, In C# you have to leave the idiomatic side somewhat to get the most performance. Though this is getting better in latter versions of C#, in which you get more low level coding features. But for me the fun part is doing exactly that. Coding as close to the metal as possible, leaving the "safe" side of C# but still using the Quality of Life features that C# offers compared to C++. That for me makes C# my favorite language ever.
- Const-me 6y agoI like C# and use it a lot, but for performance sensitive apps I need SIMD. Microsoft is making improvements, but not enough, still a long way to be comparable to C++. Currently, they don't support NEON on 32-bit ARM, and have performance issues in the JIT: https://github.com/dotnet/runtime/issues/13811 https://github.com/dotnet/runtime/issues/13811
- astrange 6y agoC# is one of the most popular languages to write games in (with Unity), so it can't be that bad. I'd expect it to perform well if you only allocate short-term objects, since it can do escape analysis and figure out they can all go on a stack, but I don't know how Mono's GC works.