Spinel on Rails
5 hours ago
- #Ahead-of-Time Compilation
- #Rails Performance
- #Ruby Compilation
- Spinel is an ahead-of-time Ruby compiler by Matz that compiles Ruby to native binary, while Roundhouse transpiles Rails apps to multiple languages, including Ruby.
- The two projects converged on a common subset of Ruby without metaprogramming, enabling a pipeline: Rails app → Roundhouse → Ruby → Spinel → native binary.
- A bet on this convergence was realized after 239 issues were closed, primarily improving Spinel's inference, dispatch, and GC under load, not expanding the subset.
- Performance benchmarks show Spinel binaries offer high memory efficiency (12-13 MB RSS) with respectable throughput, while JRuby excels in throughput using more memory.
- The collaboration involved filing minimal reproducers for issues, with Matz refining the subset boundary empirically, emphasizing process over endorsing results.