Tuning your Ruby GC for fun and profit

By simply adding the following to my .zshrc:

export RUBY_HEAP_MIN_SLOTS=2000000
export RUBY_HEAP_SLOTS_INCREMENT=500000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=70000000
export RUBY_FREE_MIN=100000

I'm getting a 10% increase running the test suite on a Rails app:

# Before:
rake  24.57s user 3.77s system 95% cpu 29.690 total
# After:
rake  21.41s user 4.22s system 95% cpu 26.897 total

Try it out and see it for yourself :)