Ruby Performance

T

tony summerfelt

luke wrote on 8/14/2005 12:31 AM:
'tim toadie' is how the anagram

is pronounced. which stands for "there's more than one way to do it".
it's like the catchy saying for perl, which allows coders to write in
different ways.

one of my favorite larry wall quotes (dealing with tim toadie) is
iirc, 'if it works, it's right'
the jury's out about whether this is great or not,

if you have to write a 5 line perl program to parse a txt file, and
you've written it in less than 45 seconds, and it takes about 2
seconds to execute, as opposed to searching the documenation/internet
for the 'right way to do it' and the 5 line program takes an hour to
write...

well THIS juror says it's great :)

writing the same 5 line program in python. i had to write it over
again a few times till it was 'written the right way' and accepted by
the entire python community as the right way...but i digress :)

i find ruby almost as flexible as perl is, with the added features of
the oo not feeling tacked on. some of my code isn't as concise as it
could be, but i figure i'll learn that as i write more ruby. for now
i just like getting my code up and running in a reasonable amount of
time...
 
R

Robert Klemme

Florian said:
This is much faster in Perl, too:

my $num = 2 ** 65;

my $i = 0;
while ($i < 94967295)
{
$num += 1;
$i += 1;
}

From this benchmark alone, you can see, that Perl is superior to Ruby
in every thinkable way.

Amazing how you extract "every thinkable way" from an eight liner. Wow!

robert
 
J

Julian Leviston

And there we have it, irrefutable proof that sarcasm often ends up on
the bit bucket in internet communication.

;-)

Julian.
 
A

Adrian Howard

On 13 Aug 2005, at 17:19, tony summerfelt wrote:
[snip]
i hope parrot dies on the vine...but it doesn't look like it's
going to

Why? Rather nice VM to play with
I think perl6 has some very interesting things[1]

it's too bad larry wall caved to the python people. is perl5 ugly?

To the Python people? I'd like to find one Python fan who would agree
with you on that! Perl 6 is just about as far from Python as I can
imagine a language to be :)

Adrian
 
A

Adrian Howard

On 12 Aug 2005, at 23:26, gabriele renzi wrote:
[snip]
But I think Lothar is right: IMVHO perl6 could have been definitely
more simple, withouth needing ~150 operators[2]

Curiously enough this number isn't radically more than there are in
Perl 5 (128) - and they're more logically grouped and named now.
, special variables like $?CLASS, ::?CLASS or ::*::Main[3],
differentiating multi/method/sub etc

I'm reserving judgement. I've not had the spare time to keep really
up to date and play with Perl 6 properly. However, my suspicion is
that it's going to be a lot simpler and logical than many people expect.

Adriian
 
I

Isaac Gouy

Bradley said:
Hi all,

I'm a relatively new Ruby programmer, I am curious as to what Ruby is
trying to achieve that other scripting languages do not already offer (Apart
from the syntactic differences of yet another scripting language, that is).
The reason I ask is that it must offer something that is worth a lot considering
it runs twice as slowly as Perl (see below).

I was also interested in comparing the performance of Ruby against something
like Perl, and (although this test is VERY simple) thought that I'd benchmark
a simple counter in both Ruby and Perl.

That's even more simplistic than the benchmark programs on the Computer
Language Shootout :)

Here's Ruby vs Perl
http://shootout.alioth.debian.org/benchmark.php?test=all&lang=ruby&sort=fullcpu

and here are the old Doug Bagley programs
http://shootout.alioth.debian.org/old/benchmark.php?test=all&lang=ruby&sort=fullcpu
 
A

Austin Ziegler

That's even more simplistic than the benchmark programs on the Computer
Language Shootout :)
=20
Here's Ruby vs Perl
http://shootout.alioth.debian.org/benchmark.php?test=3Dall&lang=3Druby&so= rt=3Dfullcpu
=20
and here are the old Doug Bagley programs
http://shootout.alioth.debian.org/old/benchmark.php?test=3Dall&lang=3Drub=
y&sort=3Dfullcpu

And, like Mr Kite's test, none of the Alioth shootout benchmarks are
worth squat.

-austin
--=20
Austin Ziegler * (e-mail address removed)
* Alternate: (e-mail address removed)
 
T

tony summerfelt

Adrian Howard wrote on 8/15/2005 5:48 AM:
with you on that! Perl 6 is just about as far from Python as I can
imagine a language to be :)

my point was there doesn't need to be a perl6.

perl is what it is. those that like it use it, those that don't, don't. :)
 
T

tony summerfelt

Adrian Howard wrote on 8/15/2005 5:48 AM:

it started off as an april's fools joke on slashdot (about combining
perl and python or something like that, i still have the page saved
somewhere). the name suggests that perlers were joke's intended target.
 
A

Adrian Howard

On 15 Aug 2005, at 17:34, tony summerfelt wrote:
[snip]
it started off as an april's fools joke on slashdot (about combining
perl and python or something like that, i still have the page saved
somewhere). the name suggests that perlers were joke's intended
target.

There was a joke instigated by Simon Cozens - a Perl developer - put
together for OSCON 2001. Aided and abetted by Eric Raymond, Guido van
Rossum and many more. This was that Perl and Python were being
merged. See <http://www.oreillynet.com/pub/a/oreilly/news/
parrotstory_0401.html> for the full story.

The targets were, of course, everybody gullible enough to fall for
it :)

Parrot the VM shares nothing beyond the name - and is an interesting
looking VM for dynamic languages. Including Perl 5 :)

Adrian
 
A

Adrian Howard

my point was there doesn't need to be a perl6.

perl is what it is. those that like it use it, those that don't,
don't. :)

Speak for yourself :) I like Perl 5. I'm sure Larry Wall quite likes
Perl 5. However it's not perfect. If nobody tried to improve things
we'd all still be using assembler rather than lovely things like
Ruby and Perl.

Adrian
 
J

Jeremy Henty

On 15 Aug 2005, at 17:34, tony summerfelt wrote:
[parrot] was a joke ... that Perl and Python were being merged.

Didn't it include a report of Matz thanking Parrot for all the Ruby
converts? :)

Cheers,

Jeremy Henty
 
F

Florian Frank

Robert said:
It was in the white space but apparently my news client had deleted it.
:)
Not in the whitespaces, it's written black on white. This is my first
try in Socratic Trolling, so cut me some slack, ok? ;)
 
A

Austin Ziegler

Others find worth where you fail.

That's only because they're uninformed or blinkered by the false
presentation on the shootout.

-austin
--=20
Austin Ziegler * (e-mail address removed)
* Alternate: (e-mail address removed)
 
I

Isaac Gouy

Austin said:
That's only because they're uninformed or blinkered by the false
presentation on the shootout.

"false presentation" - another baseless accusation?

What specifically is false about the presentation?
 
W

Wilson Bilkovich

I hate to bring up the actual thread topic.. but isn't the original
poster basically just benchmarking startup time, something that is
currently one of Ruby's weak points?
 
A

Austin Ziegler

"false presentation" - another baseless accusation?
=20
What specifically is false about the presentation?

Isaac,

I'm done responding to you. None of my statements about the
fundamental problems of the shootout and your (apparent)
administration (or boosterism, at a minimum) are false or baseless.
They are well documented over the last several months -- pretty much
every time someone brings up the question of the Alioth shootout.
(Frankly, the Debian people ought to be embarrassed that this is
hosted with them. It's an embarrassment to people who know better.)

I've told you how you can fix at least part of this. It won't make the
shootout anything really worthwhile, but it will reduce the outright
*wrong* things.

But mostly, the best thing to do would be to give it up. It's crap --
and nothing will change that.

-austin
--=20
Austin Ziegler * (e-mail address removed)
* Alternate: (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top