Rails Is a JIT Compiler
Summary
Shopify's Rails at Scale article argues that Rails can generate optimized code at run time by moving from dynamic method generation using define_method and public_send to a static approach using module_eval. It outlines the motivation, implementation challenges (enum naming and floating-point values), and presents microbenchmark results showing notable performance improvements with different Ruby runtimes. The piece highlights a practical takeaway: static code generation and inlining can yield performance boosts without a full custom compiler.