Fixing Threads in Ruby 1.8: A 2-10x performance boost at time to bleed by Joe Damato

Ruby 1.8 implements pre-emptible userland threads, also known as “green threads.” (Want to know more about threading models? See this post.) The major performance killer in Ruby’s implementation of green threads is that the entire thread stack is copied to and from the heap every context switch. Let’s take a look at a high level what happens when you

Notes

Top of Page