[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Ruby Performance - LOW ?

conker

5/7/2007 8:55:00 PM

Hi All,

It's sad to see ruby at the bottom of this list:

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

Any thoughts on this?

Are there slimmer highly optimized versions that are specifically
targeted towards certain platforms?

Thanks.

21 Answers

Robert Dober

5/7/2007 9:23:00 PM

0

On 5/7/07, conker <hkchao@gmail.com> wrote:
> Hi All,
>
> It's sad to see ruby at the bottom of this list:
>
> http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&am...
>
> Any thoughts on this?
You bet, I believe that the list roughly divides into three groups
about this, just search the archives for details.

The first is: The shootout is crap, do not worry at all! Count me in
here at 50%.

The second is: The shootout is not to be taken too seriously but still
is correct in tendency, still Ruby is fast enough for almost all it is
needed for. Count me in here at 50 % too

khaines

5/7/2007 10:17:00 PM

0

knohr

5/7/2007 11:26:00 PM

0

On May 7, 3:16 pm, khai...@enigo.com wrote:
> On Tue, 8 May 2007, conker wrote:
> > Hi All,
>
> > It's sad to see ruby at the bottom of this list:
>
> >http://shootout.alioth.debian.org/gp4/benchmark.php?test=a...
>
> > Any thoughts on this?
>
> > Are there slimmer highly optimized versions that are specifically
> > targeted towards certain platforms?
>
> This has been beat to death in the past. Check out the archives.
>
> In summary -- Sure, in general, Ruby is slower than some other popular
> interpreted languages. But it's hardly debilitatingly slow. I've got an
> asynchronous logger for ruby that will, even on modest hardware do 40-50k
> messages per second, for example. That's pretty fast. I've got a ruby
> web devel framework that buries (as well as I can test, since I don't
> see source for the tests anyway) the django numbers seen on this
> benchmark:
>
> http://wiki.rubyonrails.com/rails/pages/Framework+P...
>
> Ruby may not benchmark so fast as some other languages, but so what? It
> doesn't stop me nor thousands of other people from using it successfully.
>
> Kirk Haines

I still think that this is due to the fact that ruby is a very young
language by comparison. Not to mention, most of the development on
the language has been to add functionality. Since more and more
people are hopping on the ruby bandwagon, it is only a matter of time
till the bottlenecks in the language are overcame.
Then again, if performance is the key to an application, then one
shouldn't be using a scripting/interpretive language at all.
.....
All that said, I'm still a perl fanboy :)

Isaac Gouy

5/8/2007 1:50:00 AM

0

On May 7, 1:55 pm, conker <hkc...@gmail.com> wrote:
> Hi All,
>
> It's sad to see ruby at the bottom of this list:
>
> http://shootout.alioth.debian.org/gp4/benchmark.php?test=a...
>
> Any thoughts on this?

1) Look at a different list

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

2) set CPU Time to 0, set GZip Bytes to 1, click Calculate


knohr

5/8/2007 5:28:00 PM

0

Considering that I often choose to spawn children from my programs, i
would definately want to consider startup/shutdown time or 'cpu time'
into the benchmark, as it would have a direct affect on 90% of
production environments *especially websites*.

On May 7, 6:50 pm, igo...@yahoo.com wrote:
> On May 7, 1:55 pm, conker <hkc...@gmail.com> wrote:
>
> > Hi All,
>
> > It's sad to see ruby at the bottom of this list:
>
> >http://shootout.alioth.debian.org/gp4/benchmark.php?test=a...
>
> > Any thoughts on this?
>
> 1) Look at a different list
>
> http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?test......
>
> 2) set CPU Time to 0, set GZip Bytes to 1, click Calculate


Lloyd Linklater

5/8/2007 7:16:00 PM

0

conker wrote:
> Hi All,
>
> It's sad to see ruby at the bottom of this list:
>
> http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&am...
>
> Any thoughts on this?

I find no value to this list. First, I remember when the same kinds of
people tried to say that Native C++ code ran faster than Delphi, but
every test showed Delphi faster. I even remember when I was doing dBASE
for windows, that there was an arrSort() (array sort) method that
crashed when you opened too many items through it. One of the Borland
engineers wrote a sorting algorithm which not only ran without crashing
but was 150+ times faster than the native C++ code used. DBASE is an
interpreted language also.

Just having an interpreted language is not enough to say that it will be
slow. This site does not say just what the test is or how it is coded
for each language. There are ways to code that will change the speed of
execution dramatically.

There was another thread about running something that requires 10 msec
time slicing that ruby was able to do reliably.
http://www.ruby-...topic/... This shows that things can
be run fairly fast. One poster said that windows has a 15 msec time
slice. For Ruby to work at 10 msecs is fast.

Also, the bottom line is not how many times you can run

1000000.times
p (123.456 / 987.654).to_s

in a second.

If it is fast enough, and it usually is, then there are other
considerations that are far more important. Can you get it running
reliably in the time allotted? It is easily maintained? Is it
extensible and otherwise easily modified and updated? There is more to
the value of a language than running a single floating point calculation
a bazillion times. As long as it works fast enough to keep users from
getting annoyed, it is fast enough.

To put things like that in a chart is for people that do not think
further than just the pretty pictures at what lies behind. The people
that support and want Ruby have far more to consider and want far more
from their programming language than that.

Fwiw & imho


--
Posted via http://www.ruby-....

Jason

5/8/2007 11:09:00 PM

0

On May 7, 2:55 pm, conker <hkc...@gmail.com> wrote:

> It's sad to see ruby at the bottom of this list:
>
> Any thoughts on this?
>

Good question. This will bug the heck out of the Rubyists... But...

While Ruby looks like it is superior, sorry, IS superior to all
languages, it doesn't have the support of any major business or
scientific community that would fund and help create a complete
programming language solution that "just works" out of the box.

Ruby is fun to play with, but too many times Ruby packages are not
updated, or only get partially implimented or the implimentator gets
bored and abandons the entire code mess er. project when he finally
get's a girl friend.

When I need demonstrated faster processing speed, a clean syntax with
OOP features without resorting to obtuse "Perl-isms", usable and
CURRENT documentation, and a community of programmers that know how
to program in C/C++ so they CAN help to IMPROVE the language instead
of mindlessly beating on newbies to just STFU and live with it until
Matz gets around in one of his pending future lives to fix Ruby, I
use Python.

http://www.p...

-- Jason.

Robert Klemme

5/9/2007 9:00:00 AM

0


Please do not top post. Thank you!

On 08.05.2007 19:28, knohr wrote:
> Considering that I often choose to spawn children from my programs, i
> would definately want to consider startup/shutdown time or 'cpu time'
> into the benchmark, as it would have a direct affect on 90% of
> production environments *especially websites*.

Hm... I am not sure. Fast web site frameworks usually do not require
spawning processes all the time because they have modules loaded into
the webserver, use FastCGI or similar. The reason is of course even if
the programming environment's startup overhead is low there is still the
OS imposed overhead of creating processes. And that cannot be reduced
easily.

Kind regards

robert

knohr

5/9/2007 9:44:00 PM

0

On May 9, 2:00 am, Robert Klemme <shortcut...@googlemail.com> wrote:
> Please do not top post. Thank you!
>
> On 08.05.2007 19:28, knohr wrote:
>
> > Considering that I often choose to spawn children from my programs, i
> > would definately want to consider startup/shutdown time or 'cpu time'
> > into the benchmark, as it would have a direct affect on 90% of
> > production environments *especially websites*.
>
> Hm... I am not sure. Fast web site frameworks usually do not require
> spawning processes all the time because they have modules loaded into
> the webserver, use FastCGI or similar. The reason is of course even if
> the programming environment's startup overhead is low there is still the
> OS imposed overhead of creating processes. And that cannot be reduced
> easily.
>
> Kind regards
>
> robert

Sorry about that, I meant environments that I work on. i'm a QA
automation framework designer, and more oft then not, i use cgi
interfaces to drive my automation.

William James

5/10/2007 12:09:00 AM

0

On May 8, 6:09 pm, Jason <rsfr...@yahoo.com> wrote:
> I use Python.

Hey, J. I heard that attempting to program in
Python is like trying to scratch your ass while
wearing a straitjacket. Is that true? If it is, then
why do you do it? Do you enjoy that sort of thing?

Let's give you something really easy to try.
Well, o.k., it would be really easy for languages
that are designed to enable the programmer,
not to hobble him. So I guess it won't be so
easy in Python.

Let's say we're doing some intense calculations
and we want to show a simple progress indicator:

40.times {
print "."
time_consuming_routine
}
puts "\nFinished."

And the output is
.........................................
Finished.

Simple. (Note that there are no spaces between
the periods.) Doing it in awk is also straightforward.

for (i=0; i<40; i++)
{ printf "."
time_consuming_routine()
}
print "\nFinished."

Can you figure out how to do this trivial task
in Python?