From: Dan Sugalski Date: 2002-12-18T01:07:00+09:00 Subject: Re: Speedy Ruby (was: Re: help -- persuade my boss to adopt ruby) At 11:46 PM +0900 12/17/02, Mark Probert wrote: >Hi, Dan. > >At 05:59 AM 12/17/2002 +0900, Dan wrote: > >>Ruby execution could, with the appropriate amount of concentrated >>programmer talent thrown at it, see speedups of an order of >>magnitude, perhaps two in some cases. This is a *very* non-trivial >>thing to do, > >This is a really interesting statement to me, mostly cause I don't think >that I'd have the talent to do it! > >Where would you start? Speeding up the syntax tree? Moving to byte-code >and then optimising the op-codes? Take a structure-by-structure approach >and refine? None of those, actually. If I was going to look for the speedups I was talking about, I'd compile straight to executable code, with a heck of an optimizer in the middle. It requires good flow checking to determine implied types where possible, and on-the-fly code generation and regeneration (and recompilation) based on the likely case in the source and the changes in the source as methods get redefined. It's a really cool segment of computer research, but it's not an easy segment. It's possible to compile to executable code without the optimizing phase, but I'd be surprised if you saw more than a factor of three win in speed. (Not that a factor of three's much to sneeze at... :) >If it is really non-trivial, which I believe it would be, when do you say >that it is better to start again? (Which is rite, right?) Rite's a new start, but I'm not sure that Matz is shooting for the sort of thing I'm talking about. He might be, but I'd bet not--I'm not sure it's the right target. After rite, perhaps, or based on rite. (Honestly, which would you rather have, a rite that's faster by two or three times than current, or one that's faster by an order of magnitude or two but comes out five years later?) -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai dan@sidhe.org have teddy bears and even teddy bears get drunk