3 ms·
> but hardly any of my Ruby code is CPU constrained, All of the IO in crystal is async, so even if you're IO bound, crystal is probably a lot more efficient.
by willlll 10y ago
> but hardly any of my Ruby code is CPU constrained,
All of the IO in crystal is async, so even if you're IO bound, crystal is probably a lot more efficient.
- vidarh 10y agoI don't know what you mean. In Ruby, MRI multiplexes over async IO if you use sync IO primitives, and using async IO directly is not a problem. In any case, most of my code wait on external events (clients, databases) so it's very rare for the Ruby part to be worth optimising. I spend a lot more time doing things like optimising database indexes and the like. Of course there are plenty of areas where the balance there would be very different.