A Faster Ruby.
secretGeek .:dot Nuts about dot Net:.
home .: about .: sign up .: sitemap .: secretGeek RSS

A Faster Ruby.

[Devil's Advocate (Dvl) talks to Ruby Advocate (Rby). Inspired by ruby forum discussion, via Scott Hanselman.]

Dvl: Ruby has poor computational performance.

Rby: What? No it doesn't.

Dvl: Yes it does. You ruby people are in denial about the whole topic of Ruby's poor computational speed.

Rby: Denial? What? No we're not! Look over there!

Dvl: Yes you are. Try and say it with me "computational performance."

Rby: Comp... u... tay... What about developer performance, hey? Developer productivity is more important. Elegance, beauty, blah blah, love-ins, simplicity

Dvl: Well if Ruby developers are so damn productive, why can't they write a faster ruby?

Rby (covering ears and shouting): SHUT UP! SHUT UP! SHUT UP!





'Haacked' on Wed, 14 Mar 2007 04:16:32 GMT, sez:

I think you need to start a new blog called "The Devil's Advocate". I can be your straight man. I'll be the "The Advocate". You can be, "The Devil".

Great post!



'lb' on Wed, 14 Mar 2007 04:22:18 GMT, sez:

just clearing a little unwanted negativity out of my brain...

it did occur to
me recently that the
performance problems in
ruby probably aren't a prob
lem at all for any of the plac
es where i'd use it. and of
course you'd want to me
asure it... if it's
worth taking the
time to do that. (
you'd also want to meas
ure how long it takes to
measure the... stack overflow)





'Adi' on Wed, 14 Mar 2007 06:37:21 GMT, sez:

Scott Hanselman also mentioned the beauty vs. performance problem of Ruby with his most recent post.



'Rik Hemsley' on Wed, 14 Mar 2007 06:41:00 GMT, sez:

Ruby 2.0 will use a VM which executes code quite a bit faster than the current interpreter.

http://www.antoniocangiano.com/articles/2007/02/19/ruby-implementations-shootout-ruby-vs-yarv-vs-jruby-vs-gardens-point-ruby-net-vs-rubinius-vs-cardinal

Personally, I'm not really affected by Ruby being 'slow' except when I'm processing XML with REXML.



'Mike Woodhouse' on Wed, 14 Mar 2007 08:00:11 GMT, sez:

It's all horses-for-courses, isn't it. I wouldn't write an ad hoc C# program to do a one-off text file analysis and I wouldn't write a Ruby program to implement a neural network. To take two examples of stuff I've done.

Actually, I've done both of those tasks in both languages (because I'm perverse). The text analysis stuff was written and run in Ruby in less time than the C# program took to be debugged (although it ran heaps faster: about 0.05 sec against maybe 1.00 for Ruby). And I got the NN code working much faster in Ruby but all it was good for, performance-wise, was providing a prototype for the C# implementation.



'Eddie Paz' on Wed, 14 Mar 2007 16:23:58 GMT, sez:

I don't want to start a religious war on this, but why would one use Ruby when there's Perl. I haven't used much Ruby, but I haven't heard much good about - just like this performance issue.



'Try Ruby' on Wed, 14 Mar 2007 20:33:40 GMT, sez:

@Eddie ("why would one use Ruby")

Try ruby out, online at http://tryruby.hobix.com/

and see for yourself.

it's very different to perl.



'Haacked' on Wed, 14 Mar 2007 22:07:51 GMT, sez:

I hope Eddie was joking. "PERL"? Seriously? Ha ha. good one. I mean, any number of languages you could have mentioned. Python. Lisp. But Perl?



'lb' on Wed, 14 Mar 2007 22:32:39 GMT, sez:

>I hope Eddie was joking

don't take the bait Phil! step away from the flame war...



'Chrisnp' on Wed, 14 Mar 2007 22:56:29 GMT, sez:

Whatever. {blah-blah-blah}, but Rails will scale nicely for almost anything, you (and I) people, will ever write. You can write a NN in Ruby that will execute much faster when you translate it to OCaml, but C#?
I mean, do the prototype in Ruby, translate it and you are still left with enough time for a quick cup of coffee until the C# implementation's done, eh?



'Devil's Advocate' on Wed, 14 Mar 2007 23:06:39 GMT, sez:

>do the prototype in Ruby, translate it

okay -- so if that's easy to translate ruby into OCaml why not write a ruby interpreter that does this -- and gives better performance than the current one?

(reason is probably because translating ruby to OCaml isn't a no-brainer in all cases... hence ruby's performance is fundamentally broken and moving it to a VM or faster implementation isn't possible)



'rick' on Wed, 14 Mar 2007 23:21:37 GMT, sez:

Ruby programmers are more productive writing ruby, not c. I'd guess that most ruby programmers are very unproductive in c in fact.



'Devil's Advocate' on Wed, 14 Mar 2007 23:28:02 GMT, sez:

>Ruby programmers are more productive
>writing ruby, not c.

AFAIK, ruby programs can be translated to c.

and ruby programmer are productive at writing programs to lex and parse text because there are great facilities in the language for this.

hence, a ruby programmer can write a ruby interpreter in ruby, then translate it to c.

hey presto, a faster ruby implementation.



'MIlesZS' on Thu, 15 Mar 2007 01:39:27 GMT, sez:

You guys are all aware that there are projects in the works that will implement a faster Ruby, right? You're aware that the creator of Ruby thinks his implementation is slow, and that's why Ruby 1.9 (due in November) will have a new implementation?

I mean, at this point, the original poster, and the comments are all just masturbation. I hope you all go blind.



'Eddie' on Fri, 16 Mar 2007 11:12:36 GMT, sez:

>>I hope Eddie was joking

>don't take the bait Phil! step away from the flame war...

That wasn't a bait, I swear. But I'm glad I didn't get crushed by Ruby evangelists (I wouldn't dare asking that in the Ruby forums :)

I compared it to Perl since it's the one I know that Ruby compares to. I haven't had the pleasure to use Lisp or Python.

Now that I've taken my foot outta my mouth, I'm checking the Ruby online tutorial someone posted above. I'll come back in a couple of weeks and be the Devil's advocate for LB.



'vance' on Fri, 16 Mar 2007 21:57:31 GMT, sez:

@Eddie

You would use Ruby because you like PERL but you also like JAVA. Ruby take PERL to the next level and dumbs down JAVA so that 1 person can write an application.

As much as Ruby developers like to posit Ruby as antithetical to PERL and JAVA it really isn't, it's a nice combination of the two with a little scheme/lisp thrown in for good measure. However I think they realized they'd written the perfect language so they sprinkled the interpretor with random sleep(10)'s to make it painfully slow, just so the rest of the world wouldn't feel bad.



'Eddie' on Fri, 16 Mar 2007 23:07:06 GMT, sez:

I hope they stop feeling bad and remove the sleep calls. As I'm looking more into it, it does look like what you describe. They must be doing something good since a new Ruby section has been added to this year's SD conference http://www.sdexpo.com. I'm definitely keeping my eye on this one.



'toys' on Mon, 03 Sep 2007 05:58:02 GMT, sez:

Once again, I think, we miss a little of the point about coding and programming languages here – context. Certain languages are to be used for certain duties, certain others for other duties. Ruby is fantastic, but works the best when it is used for what it was created for. Although, it's great that sometimes languages can be used for other developments as well, sometimes it's just more sensible to use the right tool for the right job.



'jose' on Wed, 03 Oct 2007 07:09:16 GMT, sez:

For the fastest pure-Ruby Fibonacci method see http://snippets.dzone.com/posts/show/3562 (just as an example)



'birthday gifts' on Mon, 15 Oct 2007 09:49:25 GMT, sez:

Ruby doesn't really need to be faster (though, it could help) because it is a specific language that works well for specific jobs. You're not going to use Ruby to program a flight simulator. Use Ruby for what it's good for, use others for what they're good for. While Python, I think, is a fantastic alternative – sometimes Ruby just wins over it in some respects, while Pythons wins over Ruby in other respects. Comparing them is not a fair thing to do at all, in my opinion. If they can't do the job they're designed for, then by all means throw them away. But if they can, then why are you trying to use them for something else? You don't use your dishwashing soap to wash your hair.



'maclaren' on Sun, 21 Oct 2007 23:14:40 GMT, sez:

Thanks for stuff.I was looking at the material a long time.



'portrait artist' on Wed, 09 Jan 2008 06:34:15 GMT, sez:

Interesting post! I can’t wait to hear another update regarding this matter.




name


website (optional)


enter the word:
 

comment (HTML not allowed)


All viewpoints welcome. But the right to delete any post for any reason is reserved. Don't make me do it. Aim for constructiveness. Comments may be republished, emailed to your loved ones or printed and used as toilet paper. Also, I get particularly nasty on comment spam. It's not worth even trying to post comment spam here -- your html is escaped, and your links are given a rel='nofollow'. By attempting to post a comment, you understand that if the comment is considered spam, at my absolute discretion, your IP address may be used as the target of a prolonged distributed denial of service attack. Your electricity might suddenly stop working. Your car tyres will go mysteriously flat. You will suffer permanent hairloss. Your dreams will be filled with terrifying monsters. And in any case I reserve the right to record and publish your IP address.

 

TimeSnapper is a life analysis system that stores and plays-back your computer use. It makes timesheet recording a breeze, helps you recover lost work and shows you how to sharpen your act.

 

NimbleText - FREE text manipulation and data extraction

NimbleText is a Powerful FREE Tool

Use it for:

  • extracting data from text
  • manipulating text
  • generating code

It makes you look awesome. Use it right now! Go on! Hurry! Don't walk, run!

 

Articles

Mind-boggling Demo of New Gaming Genre, aka Folder-Based Hangman, aka Fun with Recursion Mind-boggling Demo of New Gaming Genre, aka Folder-Based Hangman, aka Fun with Recursion
Got CSV in your javascript? Use agnes. Got CSV in your javascript? Use agnes.
I went to write down a book name and founded an internet empire instead. I went to write down a book name and founded an internet empire instead.
NimbleText: Origins NimbleText: Origins
The Windows 8 Mullet The Windows 8 Mullet
Cosby: spontaneous striped background generator Cosby: spontaneous striped background generator
Slides from WDCNZ: Live Coding Asp.net MVC3 Slides from WDCNZ: Live Coding Asp.net MVC3
MVC 3, MVC 3, "Third Times a Charm" references
Custom Errors in ASP.Net MVC: It couldn't be simpler, right? Custom Errors in ASP.Net MVC: It couldn't be simpler, right?
Anatomy of a Domain Hijacking, part 2: The Website Who Came In From The Cold Anatomy of a Domain Hijacking, part 2: The Website Who Came In From The Cold
Anatomy of a Domain Hijacking, part 1 Anatomy of a Domain Hijacking, part 1
secretGeek.net domain has been stolen. The site may go down. secretGeek.net domain has been stolen. The site may go down.
Boring article: 'untrusted domain' issue with SQL Server. Boring article: 'untrusted domain' issue with SQL Server.
Coding While You Commute Coding While You Commute
Test Driven Dentistry Is A Good Thing Test Driven Dentistry Is A Good Thing
The 'less crashy' release of NimbleText The 'less crashy' release of NimbleText
Rethinking Toolbars in Visual Studio (or any IDE) Rethinking Toolbars in Visual Studio (or any IDE)
Where shall we have lunch? Where shall we have lunch?
Setting up email for your microIsv Setting up email for your microIsv
The NO Visual Studio movement: Compiling .net projects in Notepad++ The NO Visual Studio movement: Compiling .net projects in Notepad++
ZeroOne: the editor for programmers who think in binary ZeroOne: the editor for programmers who think in binary
Mercurial workflow for personal projects (with a .net bias) Mercurial workflow for personal projects (with a .net bias)
I see you're using vim. Let me fix that for you. I see you're using vim. Let me fix that for you.
The worst recruitment spam I've ever read The worst recruitment spam I've ever read
A thank you I forgot to say A thank you I forgot to say
My new product, NimbleText, is live My new product, NimbleText, is live
Grabbing the free songs of Jonathan Coulton (with Powershell) Grabbing the free songs of Jonathan Coulton (with Powershell)
Using NimbleSet to compare lists Using NimbleSet to compare lists
Wanted: Wiki Lists (dot org) Wanted: Wiki Lists (dot org)
DOS on Dope: The last MVC web framework you'll ever need DOS on Dope: The last MVC web framework you'll ever need
JSON Query Languages: 5 special purpose editors JSON Query Languages: 5 special purpose editors
What then, is b? What then, is b?
SQLike: A simple editor SQLike: A simple editor
Yet Another BizPlan Generator. Yet Another BizPlan Generator.
HOT GUIDS: A hot or not site for guids HOT GUIDS: A hot or not site for guids
How does life get better? One tiny hack at a time. How does life get better? One tiny hack at a time.
24 things to do, and 100 things *not* to do (yet) for building a MicroISV 24 things to do, and 100 things *not* to do (yet) for building a MicroISV
Venture capital won't kill Jeff Atwood, it will only make him Jeffer. Venture capital won't kill Jeff Atwood, it will only make him Jeffer.
A handy workflow image for newbie mercurial users A handy workflow image for newbie mercurial users
Fractal Feedback, a diversion into recreational programming Fractal Feedback, a diversion into recreational programming
Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe. Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe.
Suggested User Experience Improvements for DiffMerge Suggested User Experience Improvements for DiffMerge
SQL Style Extensions for C# SQL Style Extensions for C#
The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's
Sysi: the ultimate administrators toolkit Sysi: the ultimate administrators toolkit

Archives .: secretGeek :: Complete Archives
TimeSnapper -- Automated Screenshot Journal TimeSnapper.com    
Version 3.3: true productivity boost

Next Action NextAction
Managing the top of your mind

NimbleText -- World's Simplest Code GeneratorNimbleText -- World's Simplest Code Generator, Text Manipulator, Data Extractor

25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker


[powered by Google] 


How to be depressed How to be depressed
You are not inadequate.



Recommended Reading


the little schemer


The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
Thomas White
OJ Reeves
Eric Sink

Aggregated Links

proggit
dzone
hacker news
dot net kicks

Human Link Machines

interesting finds
a continuous learner's weblog
arjan's world
weekly link post

LinkedIn profile
LogEnvy - event logs made sexy
Computer, Unlocked. A rapid computer customization resource
PC Smart Buys - Computer Hardware in Australia
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2006 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2006 .: privacy