News for hackers. Stuff that matters.
Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost by grandalf on Monday May 18, 2009 @02:29PM (#615425)
wow this is a superb post. I wonder why anyone would really want to take the trouble to move to ruby 1.9 anymore...

I'd be curious to see the rest of the benchmarks.

Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost by wheels on Monday May 18, 2009 @06:35PM (#615836)
Note that this is pretty much only measuring thread overhead rather than thread workload throughput. So on an SMP system you'd still have the same problems with blocking I/O and only using one CPU that are part and parcel with green threads. In practice that means for something like a map-reduce pattern on a multi-core system, Ruby 1.9's native threads would win by a significant margin.

Edit: Remembered based on ice799's comment below that in 1.9 the threads still won't be allowed to operate in parallel, which neuters most of the aforementioned benefits to using native threads.

Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost by jcapote on Monday May 18, 2009 @03:30PM (#615527)
I'm curious why someone would go through the trouble to stay on 1.8?
Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost by FooBarWidget on Monday May 18, 2009 @03:50PM (#615558)
Library compatibility. Many libraries are still not compatible with 1.9. It's good to have interim improvements for 1.8 until the ecosystem has caught up with 1.9, because 1.8 is what actually powers production systems today.
Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost by rbanffy on Monday May 18, 2009 @06:43PM (#615845)
"Many libraries are still not compatible with 1.9"

It's not likely they will remain so for very long

Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost by grandalf on Tuesday May 19, 2009 @04:50AM (#616472)
I hope you're right. But I'd rather that the move to 1.9 be based on its merits as enhancements to the language rather than on the lack (in 1.8) of the sorts of optimizations that were made in the article.
Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost by rbanffy on Tuesday May 19, 2009 @12:15PM (#617043)
I would gladly accept a major library breakage for proper multi-processor support in Python. A better implementation is a significant enhancement.
Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost by derefr on Monday May 18, 2009 @08:51PM (#616015)
I've seen quite a few of these "improvement" posts lately, which take a feature of 1.8 and bring it into parity with the performance of 1.9. I always have the feeling that the author is just looking at what 1.9 is already doing and explaining it as if they discovered it themselves.
Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost by FooBarWidget on Tuesday May 19, 2009 @04:45AM (#616469)
Your response sounds dangerously close to what pro-software patents advocates would say. Just because someone else has written software which does the same thing doesn't mean that you couldn't have discovered the same method independently.

In case of this patch, even the author himself says that Ruby 1.9 doesn't do stack copying. He's not "explaining as if he discovered it himself".

Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost by derefr on Tuesday May 19, 2009 @12:34PM (#617075)
I'm not implying any malicious intent here; the author obviously didn't look at the 1.9 codebase and go "how can I pretend this is mine?" All I'm saying is that there has been a lot of independent discovery of Ruby 1.9-equivalent performance enhancements lately, is all, and this seems like a bit of a useless thing to do.

It seems that the techniques these bloggers are discovering have already been figured out, or at least equalled (in this case bettered, apparently) by the 1.9 team. I'd say fewer people should be working on enhancing 1.8 if they could just back-port the enhancements that already exist from 1.9. Instead, if they actually want to optimize something, start with the codebase that doesn't have huge, obvious, already-solved(!) performance flaws to begin with, and then backport the new optimizations you find.