Forum: Ruby How slow could ruby be compared to Python or Perl?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
444ce79d3b3a4fb4519c8b4e745f132b?d=identicon&s=25 unknown (Guest)
on 2006-03-31 06:21
(Received via mailing list)
This might be a stupid question, but I really wonder if ruby is much
slower than python and perl.
09db9a9e7139626ab3f82c66ab3e6449?d=identicon&s=25 Konstantin Levinski (Guest)
on 2006-03-31 07:19
(Received via mailing list)
It _could_ be very slow, if you set out to make it so. Othervise, they
are comparable in speed.
http://shootout.alioth.debian.org/
8979474815030ad4a5d59718d1905715?d=identicon&s=25 Isaac Gouy (Guest)
on 2006-04-04 17:20
(Received via mailing list)
Konstantin Levinski wrote:
> It _could_ be very slow, if you set out to make it so. Othervise, they
> are comparable in speed.
> http://shootout.alioth.debian.org/

Perl & Ruby
http://shootout.alioth.debian.org/gp4/benchmark.ph...

Python & Ruby
http://shootout.alioth.debian.org/gp4/benchmark.ph...

Psyco & Ruby
http://shootout.alioth.debian.org/gp4sandbox/bench...
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-04-04 18:15
(Received via mailing list)
On 3/31/06, sullivanz.pku@gmail.com <sullivanz.pku@gmail.com> wrote:
> This might be a stupid question, but I really wonder if ruby is much
> slower than python and perl.

Try it. And ignore anyone who tells you to look at the utterly useless
Alioth shootout. It doesn't model anything real-world and doesn't
actually tell you anything about performance for your problems.

I haven't checked in a while, but they weren't very honest about their
aims last time I checked, either. It's simply a matter of
self-promotion and comparison for Inane Gullibles.

-austin
8979474815030ad4a5d59718d1905715?d=identicon&s=25 Isaac Gouy (Guest)
on 2006-04-04 20:15
(Received via mailing list)
Austin Ziegler wrote:
> self-promotion and comparison for Inane Gullibles.
>
> -austin
> --
> Austin Ziegler * halostatue@gmail.com
>                * Alternate: austin@halostatue.ca

"I haven't checked in a while..."
Then your comments would apply to the Alioth shootout in... 2004?

There's nothing wrong with saying how little can be learned from
measuring small programs, but saying don't look suggests there's
something to be hidden.
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-04-04 20:33
(Received via mailing list)
On 4/4/06, Isaac Gouy <igouy@yahoo.com> wrote:
> > self-promotion and comparison for Inane Gullibles.
> "I haven't checked in a while..."
> Then your comments would apply to the Alioth shootout in... 2004?

2005. I avoid the shootout like the plague, until you pop up and
pretend that your pet project has any relevance to anything.

> There's nothing wrong with saying how little can be learned from
> measuring small programs, but saying don't look suggests there's
> something to be hidden.

No, saying "don't look" says that your aims are bogus, your tests are
worse, your validation is nonsensical to nonexistent, and your
presentation is dishonest.

Saying "don't look" says that the Alioth shootout isn't worth the
server space it takes up. It's certainly not worth the amount of
pimping you do for it.

-austin
8979474815030ad4a5d59718d1905715?d=identicon&s=25 Isaac Gouy (Guest)
on 2006-04-04 21:14
(Received via mailing list)
Austin Ziegler wrote:
> > > aims last time I checked, either. It's simply a matter of
>
> Austin Ziegler * halostatue@gmail.com
>                * Alternate: austin@halostatue.ca

And you believe all that without even looking - truly remarkable!

(I suppose there are people who make judgements about Ruby without
looking.)
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2006-04-04 21:38
(Received via mailing list)
On 4/4/06, Isaac Gouy <igouy@yahoo.com> wrote:
>
> And you believe all that without even looking - truly remarkable!
>
> (I suppose there are people who make judgements about Ruby without
> looking.)

Can we avoid this shootout thing again.  Anyone interested in the
history of this thread can find plenty on the archive, we don't need
to rehash it.

That having been said, comparing speed is a tough job.  I'll
re-iterate the standard advice which seems to work to the OP.  Try
just writing whatever you want in ruby first... then if you find
bottle necks, try to optimize them, and if you can't, C extensions are
always an option for the really computation heavy stuff.  I'm not sure
i've seen anyone switch to perl or python because of speed, because
the gain is going to be something small if anything.

So... worry about performance when it becomes an issue.  Or... if you
know how to optimize perl or python to make it sing, maybe go ahead
and use them.  Otherwise, I'm pretty sure you'll find that speed
hangups can be avoided when needed in Ruby.
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-04-04 21:41
(Received via mailing list)
On 4/4/06, Isaac Gouy <igouy@yahoo.com> wrote:
> And you believe all that without even looking - truly remarkable!
>
> (I suppose there are people who make judgements about Ruby without
> looking.)

Isaac,

I see you're as bad at reading as ever. I didn't say that I haven't
looked. You know better than that. I haven't looked recently. After the
initial round of accurate criticism (with evidence) that I unleashed on
you well over a year ago, I checked the *next* time you pimped your
worthless nonsense (about three months later).

You hadn't fixed a single damned thing.

And the next time (again, about three months later)? You *still* hadn't
fixed a single damned thing.

Obviously, over time, you have exhibited an interest in pimping your
shootout, but not fixing your methodology or presentation.

The issues with the Alioth shootout cannot be fixed cosmetically.
There's something rotten at the *core* of this project that suggests it
should be cut loose and repudiated by anyone who has ever supported it.

You're as capable as I am at digging in the archives for my previous
criticisms. Show me that you've fixed the core problems, not just put
makeup on a pig's arse and called it beautiful.

-austin
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2006-04-04 22:00
(Received via mailing list)
On 4/4/06, Isaac Gouy <igouy@yahoo.com> wrote:
> useless
> > 2005. I avoid the shootout like the plague, until you pop up and
> > Saying "don't look" says that the Alioth shootout isn't worth the
> (I suppose there are people who make judgements about Ruby without
> looking.)
>
>
> I understand that you are upset, but I *had* a look and I think I have
enough reason to consider the shootout  irrelevant:
First, everybody can contribute ones program, like that, so what if I
want
ruby to look bad, well easy enough, there comes one example into mind
(c.f.
http://shootout.alioth.debian.org/debian/benchmark...),
the program does not even run.
Second I have often seen ruby1.9 being used, futile ( so I have my two
favorite words together "futile" and "irrelevant" ;)
to explain that 1.9 is not to be used for such a thing.
I checked a different program, sorry cannot give you the link, from the
shootout, it was written for slow performance period.
And last but not least, performance rarely matters and when it *really*
matters you need a change of magnitude.
And for that to accomplish you have to extend ruby in C or interface
with C,
which is pretty easy compared to python or - even worse - perl.

So I honestly understand why Austin is upset although, I agree with you,
scientifcly speaking his attitude is wrong.
But I believe his conclusions are correct nontheless.

Cheers
Robert


--
Deux choses sont infinies : l'univers et la bêtise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.

- Albert Einstein
A777f1a2049d78a12ead38efb8f75f97?d=identicon&s=25 Tanner Burson (Guest)
on 2006-04-04 22:09
(Received via mailing list)
On 4/4/06, Isaac Gouy <igouy@yahoo.com> wrote:
> useless
> > 2005. I avoid the shootout like the plague, until you pop up and
> > Saying "don't look" says that the Alioth shootout isn't worth the
> (I suppose there are people who make judgements about Ruby without
> looking.)


I've looked at your site, nearly every time you've come in posting
specific
benchmarks about something or other.  I think its current incarnation is
by
far the worst.  You use certain performance and code characteristics,
but
instead of quantifying the actual values in the comparisons (only in the
individual listings) you list them as, X is Y times better/worse than Z.
That tells me next to nothing.  1.1 times faster means very little at
10ms,
but quite a lot at 1hr.  While I don't always agree with Austin's
attitude
towards this subject, I do agree that the site is rarely useful, and
often
causes people to mis-represent a given statistic.
8979474815030ad4a5d59718d1905715?d=identicon&s=25 Isaac Gouy (Guest)
on 2006-04-05 02:26
(Received via mailing list)
Robert Dober wrote:
> > > > > Try it. And ignore anyone who tells you to look at the utterly
> > >
> > >
> >
> > (I suppose there are people who make judgements about Ruby without
> > looking.)
> >
> >
> > I understand that you are upset, but I *had* a look and I think I have
> enough reason to consider the shootout  irrelevant:

> First, everybody can contribute ones program, like that, so what if I want
> ruby to look bad, well easy enough,

Until someone who wants to make Ruby look good contributes a better
program ;-)


> there comes one example into mind (c.f.
> http://shootout.alioth.debian.org/debian/benchmark...),
> the program does not even run.

Thank you, I can see that program has been measured with too short a
timeout.
The same program is shown here
http://shootout.alioth.debian.org/gp4/benchmark.ph...


> Second I have often seen ruby1.9 being used, futile ( so I have my two
> favorite words together "futile" and "irrelevant" ;)
> to explain that 1.9 is not to be used for such a thing.

The measurements on Gentoo : Intel are made for Ruby 1.8.4
http://shootout.alioth.debian.org/gp4/benchmark.ph...


> I checked a different program, sorry cannot give you the link, from the
> shootout, it was written for slow performance period.

Standard answer: contribute better programs.


> And last but not least, performance rarely matters and when it *really*
> matters you need a change of magnitude.
> And for that to accomplish you have to extend ruby in C or interface with C,
> which is pretty easy compared to python or - even worse - perl.

http://shootout.alioth.debian.org/gp4/miscfile.php...
8979474815030ad4a5d59718d1905715?d=identicon&s=25 Isaac Gouy (Guest)
on 2006-04-05 02:57
(Received via mailing list)
Tanner Burson wrote:
> > > > > Try it. And ignore anyone who tells you to look at the utterly
> > >
> > >
> >
> but quite a lot at 1hr.
On that page ( http://shootout.alioth.debian.org/gp4/ruby.php ) the
first paragraph includes a link to the "CPU time and Memory use
measurements"
http://shootout.alioth.debian.org/gp4/benchmark.ph...


> While I don't always agree with Austin's attitude
> towards this subject, I do agree that the site is rarely useful, and often
> causes people to mis-represent a given statistic.

I also hear positive comments.
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2006-04-05 03:12
(Received via mailing list)
On 4/4/06, Isaac Gouy <igouy@yahoo.com> wrote:

> > While I don't always agree with Austin's attitude
> > towards this subject, I do agree that the site is rarely useful, and often
> > causes people to mis-represent a given statistic.
>
> I also hear positive comments.

On ruby-talk?

Seriously, it's fine that you have this thing and maybe *someone*
finds it useful, but it doesn't seem well recieved on it's list and
the bottom line is it's not very useful for answering the OP's
question.

People have made their points loud and clear.  Perhaps you should do
the kind thing and just let it go.  If there is a community which
embraces your shootout, discuss it with them.
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-04-05 04:34
(Received via mailing list)
On 4/4/06, Robert Dober <robert.dober@gmail.com> wrote:
> I understand that you are upset, but I *had* a look and I think I have
> enough reason to consider the shootout irrelevant: First, everybody
> can contribute ones program, like that, so what if I want ruby to look
> bad, well easy enough, there comes one example into mind [...] the
> program does not even run.

The better example is the Ackermann. On Unix, at least, the stack is
able to be reset with ulimit -- and the Ruby run of Ackermann does not
use this, even though Ruby's stack frame is known to be larger than most
other programming languages.

The Python implementation does some stack manipulation without which the
program won't run *at all* (even with ulimit). One of the Perl
implementations is so compact as to be unreadable -- and it's done so
deliberately.

[...]

> So I honestly understand why Austin is upset although, I agree with
> you, scientifcly speaking his attitude is wrong. But I believe his
> conclusions are correct nontheless.

Scientifically, my attitude toward the Alioth shootout is spot on. It's
not only benchmarking (lies, damned lies and [statistics | benchmarks]),
but it's completely dishonest benchmarking for the reasons that you've
indicated above, and (last I checked) the website claimed far more than
is possible, especially since there is no control factors or proper
statistical analysis.

-austin
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-04-05 04:37
(Received via mailing list)
On 4/4/06, Isaac Gouy <igouy@yahoo.com> wrote:
> > I checked a different program, sorry cannot give you the link, from the
> > shootout, it was written for slow performance period.
>
> Standard answer: contribute better programs.

Standard answer: don't participate in this. There's nothing honest
about it, and Isaac is essentially no better than a spammer since his
primary contribution to ruby-talk is to promote this site which
provides no value to anyone and, IMO, provides harm to anyone who
takes the site seriously.

-austin
F1d37642fdaa1662ff46e4c65731e9ab?d=identicon&s=25 Charles O Nutter (Guest)
on 2006-04-05 04:55
(Received via mailing list)
Hey, if it makes y'all feel any better, Ruby is still worlds faster than
JRuby (though we're naturally working on that :)
A84d51d60791f8e0fb6d27a8a8b2a96e?d=identicon&s=25 Neil Wilson (neilw)
on 2006-04-05 10:30
(Received via mailing list)
Slower in what sense. It's certainly not slower to develop with than
either of its scripting colleagues and I find it easier to read.

The real question these days is is the language fast enough. You have
to remember that processor power is 50 to 100 cheaper than manpower. I
can afford to waste several days of processor time if I can save an
hour of manpower.
This topic is locked and can not be replied to.