4 ms·
Python is generally a bit faster than PHP though, and while Ruby is dog slow, both languages are in the heavy end for their class. Ref: http://shootout.alioth.
by troels 16y ago
Python is generally a bit faster than PHP though, and while Ruby is dog slow, both languages are in the heavy end for their class.
Ref: http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php?gcc=on&python3=on&php=on&ruby=on&calc=chart http://shootout.alioth.debian.org/u32/which-programming-lang...
- towelrod 16y agoThat kind of performance just doesn't matter that much though. I recently benchmarked my fairly standard Rails app on 1.8.7 vs. 1.9.2, and the numbers for delivering a page are basically the same. 1.9.2 is much faster for calculating Fibonacci numbers, sure, but since webapps are mostly IO bound it just doesn't matter.
- troels 16y agoOh - I fully agree. For most situations, raw computation is irrelevant. But even in the cases where it matters, PHP isn't remarkably faster than its closest alternatives.
- igouy 16y agoWho's shown Fib? If "it just doesn't matter" then what's the point of 1.9.2 performance improvement?
- towelrod 16y agoThere's not much of a point -- that's why 1.8.7 is still around, and why uptake on 1.9.2 has been so slow. If 1.9.2 really made every HTTP request go 2x as fast, don't you think every Ruby shop would have switched to 1.9.2 at least a year ago?
- igouy 16y agoStrangely you show Ruby 1.8.7 but not Ruby 1.9 or JRuby ;-) http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php?python=on&python3=on&jruby=on&yarv=on&php=on&ruby=on&calc=chart http://shootout.alioth.debian.org/u32/which-programming-lang...
- jrockway 16y agoLet's be honest. When people "use Ruby", it's very unlikely that they are using JRuby or Ruby 1.9. Similarly, when people "use Python", they are using 2.7 or lower, not 3.1. The reason is because the older versions of each are the ones with the libraries. But interestingly, this is not the case with Perl, as new releases have 99% backcompat with old releases. Even old code that uses a new piece of syntax (like "say" from 5.10) in the old way continues to work!
- igouy 16y agoLet's be honest. When people "use Ruby" (or Python) you really don't know what proportion of them are using which version. The reason is you have no data. But interestingly, this is also the case with Perl - you have no data.
- jrockway 16y agoI have a lot of data: http://stats.cpantesters.org/pmatrix-month.html http://stats.cpantesters.org/pmatrix-month.html
- igouy 16y agoYou might as well have linked to NCAA Basketball scores! Let's be honest. When people "use Ruby" (or Python) you really don't know what proportion of them are using which version. And the data you have a lot of does not help with that. Nor does the data you have a lot of tell us what proportion of Perl users use which version of Perl.
- steveklabnik 16y agoI don't have any hard numbers, but there's been a massive uptake in 1.9 since the release of 1.9.2. I've been doing all of my projects in 1.9 for a while now, and I very rarely run into compatibility errors.
- igouy 16y ago