r/programming • • Feb 24 '13

Ruby 2.0.0

http://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/
600 Upvotes

193 comments sorted by

View all comments

7

u/postmodern Feb 24 '13 edited Feb 24 '13

They also replaced mark/sweep with optimized GC using bitmap marking to make it copy-on-write friendly!

6

u/pnwf Feb 24 '13

This is huge. For so long doing anything that requires concurrency in Ruby was a tradeoff between using threads and suffering through weird hard-to-reproduce threading bugs and taking the performance hit of the GIL/GVL, or fork()ing and taking the memory hit when all your child processes' GCs force them to each have their own copy of memory that should be shared since it is never modified.

3

u/tuna_safe_dolphin Feb 24 '13

Wait, so does this mean Ruby no longer has a GIL? I'm mostly a Python programmer - I'd love if the GIL went away in Python.

5

u/nirvdrum Feb 24 '13

It still has a GIL/GVL, but all those forking app servers will save a ton of RAM. I'd read suggest reading the articles from the Passenger guys on REE and Passenger for a thorough treatment on the GC benefits.