by towski · 12y ago · 0 comments
Though in the case of CPython most of the cost comes from the refcounting. MRI is not refcounted so the performance hit of finer locking would probably be lower.
[0] http://dabeaz.blogspot.be/2011/08/inside-look-at-gil-removal...
There's also the fact that because of slow startup times, the modify/test cycle can be quite frustrating compared to working with MRI.
The truth is that the vast majority of ruby applications never reach a point where the steady-state post-warmup performance of jruby with pure ruby outweighs the fast-startup moderate performance of mri+cexts. And ones that do reach that point often have a better case for moving to something else anyways (including other jvm technologies that can now be shimmed on via jruby and eventually replace the whole thing).
"My vague plan for Ruby GIL is 1) add more abstract concurrency e.g. actors 2) add warning when using threads directly 3) then remove GIL"