Ruby Execution Models and Threading
Optimizing Ruby’s Memory Layout: Variable Width Allocation - Shopify

Optimizing Ruby’s Memory Layout: Variable Width Allocation - Shopify

12/25/2022

What this post added

This post details the Variable Width Allocation project for CRuby, which optimizes the memory layout in the garbage collector. It introduces size pools for dynamic object sizing (40, 80, 160, 320, 640 bytes), increasing heap page size to 64 KB, and enhancing resizing and compaction mechanisms. The project covers classes, arrays, and strings, aiming to improve data locality, reduce malloc overhead, and enable advanced GC research.

Read the original post ↗