From: Eric Hodel Date: 2006-05-23T16:33:11+09:00 Subject: Re: Zed and Luis drop the bomb on Ruby's poor performance On May 23, 2006, at 12:15 AM, Alex Young wrote: > Francis Cianfrocca wrote: >> I've always had a sense that some of what makes Ruby so beautiful is >> _precisely_ what makes it slow. Some of this is a matter of >> implementation (if anyone remembers the early implementations of ML, >> you know what good tail-recursion can do for you. Plus Ruby seems to >> get super-linearly worse as its working set grows), but some of it is >> fundamental. Metaprogramming is very hard to do without depending >> on a >> lot of string comparing at runtime. I've got a language design >> background (I made a lot of money writing compilers for scripting >> languages), and I've had to deal with this problem in other >> languages. >> YARV looks like beautiful work, but I have a gut-feeling that it >> won't >> solve the "speed" problem all by itself. > > Maybe you're the one to ask then. With all the talk of VMs, > everyone seems to make the comparison to Java and Python. Surely > Lisp is a better comparison? Lisps can be stupid fast (as > mentioned in another response to this thread), so what does Lisp do > right that Ruby doesn't? Lisp has a tiny syntax. Lisp has uncountable years of development. Lisp had lots of people who wanted it to go fast, so it goes fast. Ruby has a huge syntax. Comparably, Ruby has a thimbleful of years of development. Ruby has lots of people complaining about it being slow but only a handful of people doing something about it. (No, I don't consider myself someone who is doing something about it.) Its harder to make ruby go fast because its a bigger thing to optimize and there are less people willing to attempt it it. Look at Squeak for inspiration, though. Mostly you need enough people with enough brains and enough desire to make ruby go faster. (But really, you don't need the brains, they'll grow as you go.) -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com