From: Sean Russell Date: 2001-11-10T03:48:21+09:00 Subject: [ruby-talk:24790] Re: Why is ruby slow (compared to perl) Robert Feldt wrote: > I think we basically agree. BTW, I like rebellion so keep up the good > spirit! ;-) Heh. No! ;-) > Funny enough my impression of XP is more like "here are some cool > rule-breakers that kind-of worked for us". I probably misread them and > jumped to conclusions. I tend to do that... ;-) Oh, I don't know. That is probably how it started, and probably how a lot of people think about it. XP replaced a lot of old rules with some new ones that I think work better, if you don't take them *too* seriously. > Yes. However, often I find the most dramatic speed improvements come from > checking if all the things done are necessary, if the algorithms used have > "good" (algorithmic) complexity and wallclock timing properties, which > data structures have been chosen and how this affects the algorithms. For > Ruby its also important to use built-in methods. Further along down the > list is to create few objects. "Manually" inlining stuff is not > high on this list. However, when its needed I think its better done after > the performance problem is real and not as a "premature > optimization". But, then again, who can make absolute statements about an > ever changing world. Lets just expand our bag of > tools/patterns/methods/ideas... Yeah, I think we're on the same track. As I mentioned, though, inlining a single "yield" in an oft-called method can make a huge difference in execution speed. > Anyway, I think we basically agree. And I'm a recent convert myself... ;-) You know, it seems impossible to find an employer who is willing to buy into all of the really cool stuff, like XP and Ruby. --- SER