From: Sean Middleditch Date: 2002-04-04T05:18:20+09:00 Subject: Re: About efficiency On Wed, 2002-04-03 at 15:10, Alan Stern wrote: > Sean Middleditch wrote in message news:<1017798195.15689.24.camel@stargrazer>... > > On Tue, 2002-04-02 at 20:16, nobu.nokada@softhome.net wrote: > > > Hi, > > > > > > At Wed, 3 Apr 2002 08:51:31 +0900, > > > Jean-Hugues ROBERT wrote: > > > > I have been enjoying Ruby for 2 weeks now. I am very impressed. It is > > > > my understanding that currently the interpreter directly executes the > > > > parse tree versus going thru some bytecode generation phase (the later > > > > is what I did for some interpreter I wrote years ago, while at the > > > > same time a friend of mine was going the ruby way, hence we had > > > > opportunities to compare). > > > > > > Ruby VM is planned. > > > > VM's make things a *lot* faster. I'm experimenting with Scriptix, and > > taking it from the Ruby-ish nodes to a byte-code language improved the > > speed by 1.5-3 times, depending on the test (I'm no profressional > > benchmark writer, mind you). > > Can you (or anybody else) explain why that is so? It's not obvious to > me where any significant savings could accrue, except possibly from > avoiding allocating lots of syntax tree nodes during the compile > phase. Well, that is a huge source of savings. I cut the run time of smaller scripts in half just with some compiler optimizations. Yes, the savings don't matter much for large applications, but a lot of people write smaller scripts. > > Alan Stern