During compilation, some parts of your code are converted to Ruby objects and then the addresses for those objects are embedded in the bytecode. We do obviously need a strategy for reducing memory usage in Ruby!
When your Ruby code is compiled, it turns into instruction sequence objects, and those objects are Ruby objects. Typically you don’t interact with these Ruby objects, but they are there. These objects store bytecode for your Ruby program, any literals in your code, and some other miscellaneous information about the code that was compiled.
The strategy shown in this material helps to save approximately 3% memory on a basic Rails application set to production mode.