[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Ruby vs. PHP

Isaac Gouy

10/7/2007 5:13:00 PM

M. Edward (Ed) Borasky wrote:

-snip-
> The raw numbers that went into this are from the Alioth shootout
> page, and what I *haven't* done is checked out which versions of
> Perl, Python, YARV, Ruby, jRuby and PHP these tests used. They
> could be years old or they could have been run yesterday morning. :)
> I discarded all the tests for which there were any missing values.

Perl v5.8.8
Python 2.5.1
Ruby 1.9.0 (2007-08-14 patchlevel 0) [i686-linux]
Ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
Ruby 1.8.5 (2007-06-07 rev 3841) [i386-jruby1.0]
PHP 5.2.2-pl1-gentoo (cli)

You haven't mentioned how many remained after you discarded those with
missing values: at least 7 discards - Ruby 1.9.0 has 5, PHP another
one, JRuby another one. Did you actually include "hello world"?


-snip-
> Now suppose your boss comes to you, as bosses do, and says,
> "well, all them high-falutin' box plots are dandy, but the board
> of directors wants one number for each language!" It turns out
> (and I'll let Google and Wikipedia fill in the blanks for you)
> that the one number you want to give your boss, aside from your
> cell phone number, is the *geometric mean* of all the benchmark
> ratios. Again, smaller is better.


geometric mean (of ratios to most performant program):

http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?test=all&am...


-snip-
> It's pretty clear to me from these numbers is that the only
> reason that deploying web applications on the LAMP stack and its
> cousins using PostgreSQL, Perl, Python and Ruby is economically
> viable is that they spend most of their time either in the database
> or on the network.

As in - "we have found that the CPU time is rarely the limiting factor;
the expressibility of the language means that most programs are small
and spend most of their time in I/O and native run-time code."

http://shootout.alioth.debian.org/gp4/miscfile.php?file=benchmarking&title=Flawed%20...


____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invi...


1 Answer

M. Edward (Ed) Borasky

10/7/2007 6:58:00 PM

0

Isaac Gouy wrote:
> You haven't mentioned how many remained after you discarded those with
> missing values: at least 7 discards - Ruby 1.9.0 has 5, PHP another
> one, JRuby another one. Did you actually include "hello world"?

Allow me to show off in R (left-most column is a row number -- ignore it):

> ln.ratio[,1:2]
test iter
1 binarytrees 12
2 binarytrees 14
3 binarytrees 16
10 fasta 250000
11 fasta 2500000
13 hello 1
14 hello 200
15 knucleotide 10000
16 knucleotide 100000
17 knucleotide 1000000
18 mandelbrot 120
19 mandelbrot 600
20 mandelbrot 3000
25 nbody 200000
26 nbody 2000000
27 nbody 20000000
28 nsieve 7
29 nsieve 8
30 nsieve 9
34 partialsums 25000
35 partialsums 250000
36 partialsums 2500000
37 pidigits 500
38 pidigits 1500
39 pidigits 2500
40 recursive 3
41 recursive 7
43 regexdna 100000
44 regexdna 300000
45 regexdna 500000
49 spectralnorm 500
50 spectralnorm 3000
51 spectralnorm 5500
52 sumcol 1000
53 sumcol 11000
54 sumcol 21000

If there are things I should throw out, let me know and I'll re-run the
plots.

> geometric mean (of ratios to most performant program):
>
> http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?test=all&am...

Yeah, I saw that. I wanted to use gcc as the baseline for everything.

> As in - "we have found that the CPU time is rarely the limiting factor;
> the expressibility of the language means that most programs are small
> and spend most of their time in I/O and native run-time code."
>
> http://shootout.alioth.debian.org/gp4/miscfile.php?file=benchmarking&title=Flawed%20...

For nice tight "inner interpreters" aka "virtual machines", true,
including YARV. I'm seeing otherwise for MRI. This is not news to the
Ruby community, btw.