From: Charles Oliver Nutter Date: 2007-09-28T09:18:33+09:00 Subject: Re: question on bottleneck of ruby Francis Cianfrocca wrote: > I agree with Kirk. Ruby's inherent performance bottleneck is also its most > distinctive feature: the open classes and data structures. There's always > going to be a limit to how much faster you can do name-resolution at > runtime, since it's costly to begin with, and you can't deterministically > predict it. (There are approaches to adaptively predict name-bindings at > runtime, notably from Smalltalk, and I expect JRuby will be able to leverage > them. But they can ameliorate, not solve, the fundamental issue.) The fact that classes are open doesn't really impact Ruby performance all that much. Ultimately the largest reasons for poor performance are the fact that methods, instance variables, and constants can't be bound during a compile phase and must be looked up at runtime. But the same techniques used to speed up other dynamic languages can apply equally well here. > Garbage collection and poor memory usage, on the other hand, are problems > that can and should be solved. Very true, and I hope these are solved some time in future 1.9.1 releases, because I worry that with YARV running faster and generating garbage faster, the GC bottlenecks are going to become more pronounced. - Charlie