Live data from Hacker News

Ruby is faster than Python, PHP, and Perl

unlimitednovelty.com

11–16 of 16 posts

Re: Ruby is faster than Python, PHP, and Perl

#11

Does this really matter? I mean,seriously, if speed is what you want, you'd write it in C. These days, with virtually unlimited CPU, we choose our languages based on suitability for the task, readability and community support (at least I do). Other than assembler for games, I have never chosen a language based on speed of execution. Anyone else? Can't we also just compile Ruby (or PHP or Python) to C and then let the…

You can compile PHP to C++ using HipHop (https://github.com/facebook/hiphop-php)

In my opinion each language is a tool and all have their place. Knowing what each can and cannot do is more important than which is faster. It also comes down to preference as well. If you are use to using PHP, then continue to use it. Would you use PHP for system admin tasks? No, you would use python or ruby.

Can't we all just get along and agree to stop bashing languages when comparing them to each other?

Re: Ruby is faster than Python, PHP, and Perl

#13

Does this really matter? I mean,seriously, if speed is what you want, you'd write it in C. These days, with virtually unlimited CPU, we choose our languages based on suitability for the task, readability and community support (at least I do). Other than assembler for games, I have never chosen a language based on speed of execution. Anyone else? Can't we also just compile Ruby (or PHP or Python) to C and then let the…

I imagine Javascript's advantage is because V8 is a JIT compiler. It's unfortunate LuaJIT is not shown since it would probably be around the same level or higher than V8.

I'd also be interested to see Pypy's experimental JIT compared here (or pypy at all, for that matter).

Re: Ruby is faster than Python, PHP, and Perl

#14
post #3

Did anyone else find it strange that Ruby only beat Python and PHP in the median range? On both ends Python and PHP are both quite faster. I don't really know how to read this thing, but I feel like this title is probably misleading?

Yes, I'd be far more interested if the author spent any time analyzing the data rather than dancing gleefully for a dozen paragraphs.

Re: Ruby is faster than Python, PHP, and Perl

#15
post #3

Did anyone else find it strange that Ruby only beat Python and PHP in the median range? On both ends Python and PHP are both quite faster. I don't really know how to read this thing, but I feel like this title is probably misleading?

This post is a rhetorical rant, so it's best not to take the core premise too seriously. Even though the title is "Ruby is faster than Python, PHP, and Perl", I don't think it's the author's intention to make that broad claim. Rather, the intention is to beat out of everyone's head that Ruby is "slow".

When speaking about languages in the same ballpark (Ruby, Python, Perl, etc), it's difficult to make blanket statements about which one is "faster", because they each have their warts. Depending upon what your application needs to do, you may run in to those warts.

Re: Ruby is faster than Python, PHP, and Perl

#16

Does this really matter? I mean,seriously, if speed is what you want, you'd write it in C. These days, with virtually unlimited CPU, we choose our languages based on suitability for the task, readability and community support (at least I do). Other than assembler for games, I have never chosen a language based on speed of execution. Anyone else? Can't we also just compile Ruby (or PHP or Python) to C and then let the…

> Does this really matter?

Sometimes. If your app is network/memory/disk bound, no. If it is CPU bound, yes. That's why web apps are in Python/Ruby, and games are in C++/C#.

Also, Ruby/Python/interpreted language performances are within a magnitude of each other so they're effectively equivalent.

Post reply on HN