YARV is Ruby, It Is, It Really Is #
Koichi has finished committing YARV to Ruby’s trunk. We’re on our way to Ruby 1.9.1. Great work, Ruby-Core!
$ svn co http://svn.ruby-lang.org/repos/ruby/trunk ruby $ autoreconf -ivf $ ./configure --prefix=/opt/ruby-trunk $ make # make install-nodoc $ export PATH=/opt/ruby-trunk/bin:$PATH $ ruby -v ruby 1.9.0 (2007-01-01 patchlevel 0) [i386-freebsd6.0]
Oh, and if you want to install extensions, you’ll need to uncomment them in ext/Setup
.
Update: Murphy’s got some informal benchmarks which produce a YARV speed-up chart. Try out this script here. (from [ruby-core:9825])
Luis Lavena
Man, you don’t sleep? you didn’t party? anyway, good news, doing a checkout right now, thanks for the info! ;-)
olleolleolle
These step-by-steps are both fine news reportage and helpful hand-holding. Two features for the price of one post.
FlashHater
Nice. Does YARV have a bytecode compiling/running feature yet?
topfunky
I’ve heard that writing Ruby fulfills the same purpose for why that sleep fulfills for most other humans.
If he stopped to sleep for 8 hours, he would be incredibly tired. That happened once and they had to resuscitate him by reading the source of delegate.rb aloud.
As a child he also had this same ability. Instead of waking up at night and crying, he woke up and wrote Ruby code.
LninYo
awesome!
umageller
wheeee !! do we get real threads now ?
Joseph Dunn
Seriously awesome.
Paul Davis.
It surprises me that this great news has not gotten more awareness. With a smattering of performance concerns clouding Ruby for some observers, I would expect this material speed increase to cause broader celebration.
Maybe it will happen later in the week, or perhaps I am missing a subtle gotcha.
Jaroslaw Zabiello
I compared Ruby 1.9 with 1.85, Python 2.4.3, 2.5, Lua 5.1 and PHP5 . See results :)
why
Paul: I don’t think many people have used YARV yet. In addition, Matz and Koichi have been seriously downplaying their progress this year. Matz called Ruby 2.0 the longest vaporware in open source and Koichi used a slide that read Rite > Parrot ? (level of vaporware). I think they do that to disarm us, but it’s tempting to believe them. And tempting to compare YARV to hot stuff like Rubinius and JRuby based purely on hearsay, without considering that Koichi is one of our quieter friends from Japan.
If I hadn’t used YARV myself and watched this incredible feat by Koichi unfold, I probably woulda taken that bait too. (JRuby and Rubinius are totally incredible feats as well!!)
FlashHater
tolas
what a tasty new years treat
evan
Yarvy yarvy sandbox?
TaQ
Seems that native threads still aren’t there, are they? I made a test with 3 threads, the second of them blocking, and the third one was stuck waiting for it.
FlashHater, seems that you missed the gperf step on
Make a new checkout and see if it complains. If it does, install gperf and everything will work fine. :-)Hank
How does YARV performance compare to PHP if eAccelerator or one of those other byte-code caches is used?
rcorsaro
I don’t see YARVCore with
(and neither do you above). Am I using YARVCore? And if not, how do I use it? There doesn’t seem to be anything out there on compiling to byte code and such. Is it happening automatically? I was expecting to have to compile to byte code then run byte code. Am I crazy?Rob Muhlestein
Compiles great on FC4 . Thanks. [Compiling beats watching football on any New Year’s day.] ;-)
Hank
@Rob Muhlestein
Compiling beats watching football on New Year’s Day ??? Then that means you missed this from yesterday game.
http://i11.tinypic.com/4h8qvwj.jpg
murphy
@Jaroslaw: Sorry, wasn’t able to reproduce our results on my Mac. Python and PHP are still faster than Ruby here, significantly.
What’s up?
Vagabond
In every test I tried on my 500mhz thinkpad ruby 1.9.0 was slower than 1.8.5…
Jaroslaw Zabiello
@murphy: Try 64bit processor and 64bit OS. I had a chat with one person which had Ubuntu 6.0.6 but he used 32bit and its Ruby 1.9 was working much slower. I repeated my test and got the same results. Ruby 1.9 on my 64bit Athlon64 3700+ and 64bit Ubuntu 6.0.6 is faster than Python, PHP and even Lua.
why
Jaroslaw: Did you compile Python, PHP and Lua yourself on that architecture?
mitsuhiko
@Jaroslaw Zabiello: That one person was me ;) I now have compiled PHP 5 , Python 2.5 and Ruby 1.9 from source here and Python is here more than twice as fast as Ruby. And PHP is faster too. I don’t think that’s a problem though.
But I must admin that I’m more interested in Rubinius then ruby1.9 since their approach looks a lot better. Reminds me of pypy/rpython.
Jaroslaw Zabiello
why: Yes and no. Python 2.4.3 and Lua 5.1 were installed from debian packages. Python 2.5, Ruby 1.8.5 and Ruby 1.9 were compiled from source tarballs.
FlashHater
I got it compiled (thanks TaQ, I had to re-check-out, not just make clean and reconfigure) I ran Jaroslaw’s addition benchmark for Ruby on my lowly 1.6GHz Athlon, and got a 50% speed increase between 1.8.5 and 1.9.0 :D
Frank
This is very disappointing.
rcorsaro
I do, on the other hand, get much better run times. s=0; 1.upto( 10000 ){|i| s += i} is ten times faster than 1.8.5 on a Sempron 2200!! Is it internally made into byte code?
ehird
does it run camping? ;)
murphy
@rcorsaro: yes, as far as I understand, it’s assebled and then executed by the VM.
funny…we really have to find out what’s causing those huge benchmark differences.
Curious Cat
Does Rails work on YARV ?
slowernet
To clarify for those having FlashHater’s parser_yylex compile error, install gperf into your path and restart from the
autoreconf -ivf
step.murphy
@Curious Cat: ko1 made it work, yes. maybe a few code adjustements due to changes in Ruby 1.9 are needed, haven’t tried yet.
rogojin
Has anybody tried compiling on win32/win64? I end up with a whole bunch of unresolved externals on msvcr80-ruby19-static.lib, when it’s trying to compile miniruby.exe