3 ms·
Wow, Shopify continues to make some heroic improvements here. Kudos, kudos, kudos. Thanks, Shopify folks. One thing I didn't see discussed in the article was Y
by JohnBooty 3y ago
Wow, Shopify continues to make some heroic improvements here. Kudos, kudos, kudos. Thanks, Shopify folks.
One thing I didn't see discussed in the article was YJIT's memory usage relative to CRuby, the baseline non-JIT version of Ruby. It is certainly possible I missed it; that's been known to happen!
Anyway, the news there is very good. We can see detailed information here:
https://speed.yjit.org/memory_timeline.html#railsbench https://speed.yjit.org/memory_timeline.html#railsbench
Currently Railsbench consumes a peak of ~95MB with CRuby, and a peak of ~110MB with YJIT. So, YJIT delivers 70% more performance while consuming 16% more RAM here. That is a tradeoff I think most people would gladly accept in most scenarios. =)
Real-world speedups will be less, since a "real" web application spends much of its time waiting for the database and other external resources. As the article notes, Shopify's real-world observed storefront perf gain is 27.2%.
YJIT is a success and its future is even brighter.
- shadowbanned0 3y ago[dead]
- deleted 3y ago[deleted]
- jez 3y agoThe Memory Usage on Benchmarks section shows CRuby as one of the bars. It is the lowest across the board. YJIT, being implemented in CRuby, uses at least as much memory as CRuby in all the benchmarks (you could maybe imagine one day JIT’d code using less memory in specific situations by compiling code to a more efficient algorithm that skips allocations the interpreter would make, but it appears that is not the case yet today).