About a five-minute read.
koduki/example-rails-aot asks an interesting question: if we resolve a Rails application's framework machinery ahead of time, how much work can we remove from each request?
The answer is encouraging—and includes a classic performance trap. Generated Ruby can be dramatically faster and use less memory than Rails. But an inefficient association-loading algorithm can erase the speed advantage. Compiling that code to native machine code introduces another set of concerns: connection handling and operating-system limits.
Here's what the experiment actually compared, and what it found.