From: george.marrows@... (George Marrows) Date: 2004-01-17T00:05:07+09:00 Subject: Re: ruby-dev summary 22435-22573 Robert Feldt wrote in message > Minero Aoki wrote: > > >[ruby-dev:22494] [ANN] YARV: Yet another Ruby VM 0.0.0- > > > > SASADA Koichi announced his new product YARV, Yet another > > Ruby Virtual Machine. This VM works as a ruby extension. > > Get it from: > > > > http://www.atdot.net/yarv/ > > > > Note that these files contain CR LF line terminators. > > Very interesting and a nice way to try out a bytecode-VM core. It's a very similar approach to ByteCodeRuby (http://rubyforge.org/projects/bytecoderuby/), which also works as a Ruby extension. BCR needs to patch Ruby slightly though - I'm impressed Sasada-san has managed to avoid this so far. On the plus side, BCR is much further advanced, with most of the Ruby language implemented (the big things missing are retry, eval, threads and various set_trace_func-style callbacks). It also has 650+ tests to ensure that its results match Ruby's. The next BCR release (probably in 4-6 weeks) should be self-hosting - BCR will be capable of running its own compilation code (which is written in Ruby) and supporting libraries (Ruth and Test::Unit). > I get > about 21% speed increase with this approach with threaded dispatch and > about 24% with direct threaded dispatch compared to Ruby 1.8.1 > 2003-12-22 (on cygwin) on small benchmarks. I think it's very promising > considering the bytecode emitted can probably be optimized quite a lot > more. Intriguing! ... on the minus side, BCR is currently slightly slower than Ruby on average. There has been no optimisation at all so far, but it is of course planned: YARV's direct threaded code and specialised + bytecodes are all listed in BCR's todo. The release after next will start to address performance. From an admittedly brief glance at the code, I think it's premature to compare YARV and Ruby performance - for example, YARV doesn't seem to handle optional, scatter and block arguments when calling methods, all of which have costs. Apologies if I'm overlooking something .. BTW thanks for the pointer to LLVM in your recent post - very interesting! BTW2 anyone else enjoying the glories of trying to read ruby-dev through Babelfish or excite translation services? 'Matsumoto Yukihiro here' comes through as: 'The original going which it waits which is wide' (Babelfish) 'It is also as a pine. It dies and is hiro' (excite) Wonderful!