5 ms·
We used to run a production service written in JRuby until a year or so ago (at which point it was rewritten in kotlin). It was a minimal pure ruby service dep
by lf-non 5y ago
We used to run a production service written in JRuby until a year or so ago (at which point it was rewritten in kotlin).
It was a minimal pure ruby service deployed as a tomcat servlet.
Despite not using any heavy weight framework (eg. rails etc.) its performance (after warmup) was nowhere close to "almost C like".
JVM gives you true multithreading etc. but claiming that JRuby performance is C like is just misleading.
- pjmlp 5y agoWell, https://news.ycombinator.com/item?id=13056334 https://news.ycombinator.com/item?id=13056334
- byroot 5y agoThat's TruffleRuby, not JRuby. And even then, I haven't benchmarked myself, but I wouldn't be surprised most NES emulators written in C or other native languages out there would do way more than 150FPS. Edit: and it doesn't really matter either way because while useful, optcarrot is a very different workload from what Ruby is generally used for.
- nitrogen 5y agovery different workload from what Ruby is generally used for. Ruby is generally used for a lot of things, including scientific computing. I'm using it to process sound and make videos about sound, for example. Audio processing isn't too far off from the type of hot loop an emulator would have, so I hope to see benefits from YJIT in my own work, and will also try TruffleRuby once I've finished my current round of video editing.
- pjmlp 5y agoYeah, I got that wrong. Who cares if they do more than 150 FPS, when humans cannot see more than 60 FPS, unless we are talking about VR, which is nonsense for a NES emulator anyway. Trying to win the benchmarks game makes people lose sight from what actually matters. SPA would never had taken off if it wasn't for the work done in JavaScript JITs. Similarly, Ruby JITs can open doors for just being the language used for Rails applications.
- byroot 5y ago> Who cares if they do more than 150 FPS I don't, but you said "almost C like".
- pjmlp 5y agoIf we are going pedantic, we can also start discussing how crappy C used to be in 8 and 16 bit computers. "C like" as in the human doesn't see a difference.
- Zababa 5y ago> Who cares if they do more than 150 FPS, when humans cannot see more than 60 FPS Things in 120 FPS feels smoother than in 60 FPS. Less than 60 compared to 30, but it's still noticable. I don't know the exact mechanism, but I suppose that's because the real world has no concept of FPS and what we see is continuous, so our eyes are used to seeing something like this.
- matheusmoreira 5y ago> Who cares if they do more than 150 FPS Everyone who uses features such as fast-forward and run-ahead.