Tiny JITs for a Faster FFI
Can we have a faster FFI for CRuby? Yes.
The Ruby and Rails Infrastructure team at Shopify exists to help ensure that Ruby and Rails are 100-year tools that will continue to merit being our toolchain of choice.
Visit railsatscale.com → RSS feedOn Hacker News Jun 2023 – Sep 2025
Software Engineering 13Systems & Performance 9Tools & Productivity 2Programming Languages 1AI & Machine Learning 1
Can we have a faster FFI for CRuby? Yes.
Many Ruby applications allocate objects. What if we could make allocating objects six times faster? We can! Read on to learn more!
This year, the YJIT team and I have gotten a paper accepted at MPLR 2023 (Managed Programming Languages and Runtimes), which is now freely available through ACM open access. The paper, titled “Evaluating YJIT’s Performance in a Production Context: A Pragmatic Approach”, goes into details of the strategy taken to…
This year, the YJIT team has been working hard to improve and optimize YJIT. We’re proud to say that the version of YJIT to be included with Ruby 3.3 is leaps and bounds ahead of Ruby 3.2’s. It provides better performance across the board, while also warming up faster and using less memory. The 3.3 release is also…
Ruby’s garbage collector is designed to be adaptable, scaling from short Ruby scripts to running apps that serve millions of requests per second. While it’s designed to be adaptable, it may not work optimally for every use case. For this reason, Ruby’s garbage collector supports many parameters that can be used to…
Ruby 3.2 YJIT has optimized the production workloads of Shopify and other companies. We encourage you to enable YJIT in production. Once Ruby 3.3 is released, it should make your application even faster.
In this post we look at the impact of a new feature of Ruby 3.4 on Shopify’s monolith.
YJIT’s ability to improve performance by adapting to run-time behavior can increase the speed of our code in a way that dropping down to C can’t. As such, I think we should reconsider the common wisdom that “rewriting our Ruby in C” is the ideal path to performance optimization and take a serious look at “rewriting…
Where does JIT-compiled code live? How does Ruby switch between bytecode and native execution? Why does TracePoint slow everything down? This post answers the JIT questions most Ruby developers have but rarely see explained.