Project

General

Profile

Feature #22630

Updated by fuzzyrichie-gusto (Richard Desmarais) 8 days ago

I was playing around with options to reduce GC time/cost. It seems to be one of the biggest things we hit in our app. 

 In doing so, Claude was able to find 4 changes that could dramatically reduce GC time on a warmed up host (it pointed to an 80x win, which I'm dubious about). I'll link them below as I open the PRs. 

 https://github.com/ruby/ruby/pull/20097 
 - improvements to gc_mark, with 4 changes that help with the fixed per-call costs 

 https://github.com/ruby/ruby/pull/20098 
 - prefetch the gc_update_weak_references for 32 references ahead 

 https://github.com/ruby/ruby/pull/20099 
 - prefetching children during full marks 

 https://github.com/ruby/ruby/pull/20100 
 - opt-in RUBY_GC_PERMANENT_GENERATION setting, making full_mark GCs much faster

Back