If you then process your requests in the slowest programming language, you add back at least 100x the overhead.
It doesn’t make sense to me.
If you then process your requests in the slowest programming language, you add back at least 100x the overhead.
It doesn’t make sense to me.
In fact, the whole idea for this library is to provide a low-level, fast, flexible, asynchronous I/O layer for building Ruby apps and letting Ruby+YJIT optimize the app code, which it actually is getting pretty good at.
If you're open to learning more about where the Ruby runtime is performance-wise, there was a very interesting recent talk [1] about this very subject.
[0] https://github.com/digital-fabric/iou/blob/main/examples/htt... [1] https://www.youtube.com/watch?v=qf5V02QNMnA
The "performance" of the language is going to have approximately zero effect once a request has to schlep over to the database in a 7ms round-trip.
There's a wide field of applications where language performance has approximately zero effect on application performance. I have 15ms of latency, what do I care if your web app is written in Rust?
Using flags to shut down entirely reasonable discussion is very lame.
Of course, I don’t see why that won’t perform fine for Ruby.
It’s just so slow that optimizing the async IO at the OS level doesn’t matter
If the difference between IO uring and epoll is 2x, but that was only 5% of the total runtime, the rest being slow Ruby code, then at best you get a 2.5% speed up. Not worth it.
In addition, the blog post measures the cost of avoiding doing the interop, which allows wins as the compiler improves in the case of short-lived calls implemented in a native component.
This, however, is not exclusive to Ruby and statically typed JIT or AOT compiled languages benefit from this to a much higher extent.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
I remember when these claims were made for Java twenty years ago. It’s still slower than C, most of the time.
Some things don’t change.