Is ruby is faster than all Object oriented Scripting langs

Hello,

  I am looking at the couple of scripting languages I found the best
two one is Ruby and other is Python. I want to learn one of these
languages but I dont know the prons and crons of these 2 languages.
But as the 1st look I want to know which one of these languages will
be fast when we are running the application..

Thanks,
Ramu.

Ruby is the slowest executing of all scripting languages. I suggest you
go with python. I've studied both languages and I prefer python.

···

bramu.ss@gmail.com wrote:

Hello,

  I am looking at the couple of scripting languages I found the best
two one is Ruby and other is Python. I want to learn one of these
languages but I dont know the prons and crons of these 2 languages.
But as the 1st look I want to know which one of these languages will
be fast when we are running the application..

Thanks,
Ramu.

--
Posted via http://www.ruby-forum.com/\.

Benchmarks depend on the application you are testing against.

What kind of application are you doing?

Have you looked at Groovy?

···

--
Regards,
Casey

learn them both.

the speed will depend entirely on the application - for instance there are c-bindings for many libraries in both python and ruby. if the binding exists for one but not the other your application will be faster in that one. frankly, if you are learning either one for 'speed' you've got real troubles - both are 100/10000 time slower than pure c for cpu intensive tasks. we write ruby because it makes our minds stop hurting and because it let's solve problems that we would not be able to comprehend in other languages, and therefore which would remain unsolved. python is quite good with regard to this too.

technically speaking you don't really learn a 'language' - you learn an implementation of a turning machine and use it to solve problems. the choice if implementation should be determined by

   a) what you like.

   b) what you require.

i order them that way because very little code gets written when you hate what you are doing.

kind regards.

a @ http://codeforpeople.com/

···

On Mar 28, 2008, at 8:05 PM, bramu.ss@gmail.com wrote:

I am looking at the couple of scripting languages I found the best
two one is Ruby and other is Python. I want to learn one of these
languages but I dont know the prons and crons of these 2 languages.
But as the 1st look I want to know which one of these languages will
be fast when we are running the application..

--
we can deny everything, except that we have the possibility of being better. simply reflect on that.
h.h. the 14th dalai lama

How did you determine that "the best two" were Ruby and Python if you
"don't know the pros and cons" of the two languages?

···

On Mar 28, 10:01 pm, "bramu...@gmail.com" <bramu...@gmail.com> wrote:

Hello,

  I am looking at the couple of scripting languages I found the best
two one is Ruby and other is Python. I want to learn one of these
languages but I dont know the prons and crons of these 2 languages.
But as the 1st look I want to know which one of these languages will
be fast when we are running the application..

Maybe with YARV virtual machine (integrated in Ruby since 1.9.1 AFAIK) will
Ruby faster?

···

El Sábado, 29 de Marzo de 2008, 7stud -- escribió:

bramu.ss@gmail.com wrote:
> Hello,
>
> I am looking at the couple of scripting languages I found the best
> two one is Ruby and other is Python. I want to learn one of these
> languages but I dont know the prons and crons of these 2 languages.
> But as the 1st look I want to know which one of these languages will
> be fast when we are running the application..
>
> Thanks,
> Ramu.

Ruby is the slowest executing of all scripting languages. I suggest you
go with python. I've studied both languages and I prefer python.

--
Iñaki Baz Castillo

Hi 7Stud,

···

On Mar 29, 1:36 pm, 7stud -- <bbxx789_0...@yahoo.com> wrote:

... I've studied both languages and I prefer python.
--
Posted viahttp://www.ruby-forum.com/.

thems fight'n words :wink:
Just out of curiosity though what makes you prefer Python?
I'm looking into both myself, so i'd appreciate your opinion.

cheers,

--
Mark

That's an amazing bold claim I would never be brave enough to make. I'm sure we all know Ruby is not as fast as many languages, but anyone who has studied programming at all knows fundamental truths like:

* The algorithm counts far more than the language when optimizing for speed
* Speed should be a late concern in most projects
* It's generally pretty easy to optimize the 10% of the code where speed is actually critical, even if you need to drop down to something like C for just that part

I have little doubt that we could find some Python code slower than equivalent Ruby projects, just as I'm sure we could find some code to support your claim. I think the key is just to avoid this kind of one-dimensional thinking in the first place though.

If your going to choose Python because you think it's faster, I have a better recommendation: write down all the languages you can think of, close your eyes, and point. It's the same (or possibly better) selection criteria.

Besides we all know C and OCaml smoke Python in speed. :wink:

James Edward Gray II

···

On Mar 28, 2008, at 9:36 PM, 7stud -- wrote:

bramu.ss@gmail.com wrote:

Hello,

I am looking at the couple of scripting languages I found the best
two one is Ruby and other is Python. I want to learn one of these
languages but I dont know the prons and crons of these 2 languages.
But as the 1st look I want to know which one of these languages will
be fast when we are running the application..

Thanks,
Ramu.

Ruby is the slowest executing of all scripting languages.

Casey Hawthorne wrote:

Benchmarks depend on the application you are testing against.

What kind of application are you doing?

Have you looked at Groovy?

--
Regards,
Casey

The last time I looked (November 2007) Groovy was about the slowest thing out there.

ara.t.howard wrote:

···

On Mar 28, 2008, at 8:05 PM, bramu.ss@gmail.com wrote:

I am looking at the couple of scripting languages I found the best
two one is Ruby and other is Python. I want to learn one of these
languages but I dont know the prons and crons of these 2 languages.
But as the 1st look I want to know which one of these languages will
be fast when we are running the application..

learn them both.

the speed will depend entirely on the application - for instance there
are c-bindings for many libraries in both python and ruby. if the
binding exists for one but not the other your application will be
faster in that one. frankly, if you are learning either one for
'speed' you've got real troubles - both are 100/10000 time slower than
pure c for cpu intensive tasks. we write ruby because it makes our
minds stop hurting and because it let's solve problems that we would
not be able to comprehend in other languages, and therefore which
would remain unsolved. python is quite good with regard to this too.

technically speaking you don't really learn a 'language' - you learn
an implementation of a turning machine and use it to solve problems.
the choice if implementation should be determined by

   a) what you like.

   b) what you require.

i order them that way because very little code gets written when you
hate what you are doing.

kind regards.

a @ http://codeforpeople.com/

Here.. Here... As a person new to Ruby with VB, Delphi, & C experience,
you goto love both what you do and what you use to get it done.
Otherwise..., it's like climing Mauna Kea Hawaii 13K+ from the sea
floor. It's more work thank it has to be. M2C

tonyd
--
Posted via http://www.ruby-forum.com/\.

<snip>

we write ruby because it makes our minds stop hurting

I would put this right next to the famous "Ruby stands out of your
way" quote (Matz', right?).
Very nicely put indeed.

Cheers
Robert

···

On Sat, Mar 29, 2008 at 6:01 AM, ara.t.howard <ara.t.howard@gmail.com> wrote:
--
http://ruby-smalltalk.blogspot.com/

---
Whereof one cannot speak, thereof one must be silent.
Ludwig Wittgenstein

Of course, one could really confuse the issue by coming in with things like this:

http://www.tbray.org/ongoing/When/200x/2007/10/30/WF-Results

in light of this:

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

The reason why should confirm many of the responses to this thread.

···

On 29 Mar 2008, at 21:25, Brian Adkins wrote:

On Mar 28, 10:01 pm, "bramu...@gmail.com" <bramu...@gmail.com> wrote:

Hello,

I am looking at the couple of scripting languages I found the best
two one is Ruby and other is Python. I want to learn one of these
languages but I dont know the prons and crons of these 2 languages.
But as the 1st look I want to know which one of these languages will
be fast when we are running the application..

How did you determine that "the best two" were Ruby and Python if you
"don't know the pros and cons" of the two languages?

It does seem a somewhat inflammatory statement to make on this list.

Clearly it is a completely subjective argument but i think if you want
incredible performance, C is a pretty good option but if you want to enjoy
writing code and produce code so beautiful that it will make your
grandchildren weep for joy, ruby is the best currently available option.

I guess some grandchildren will argue that the poignancy of python makes
them weep with more joy but i'd think they were in the minority. This would
be an easily measured and incredibly useful statistic.

···

On Sat, Mar 29, 2008 at 2:50 PM, Mark Woodward <markonlinux@gmail.com> wrote:

Hi 7Stud,

On Mar 29, 1:36 pm, 7stud -- <bbxx789_0...@yahoo.com> wrote:

> ... I've studied both languages and I prefer python.
> --
> Posted viahttp://www.ruby-forum.com/.

thems fight'n words :wink:
Just out of curiosity though what makes you prefer Python?
I'm looking into both myself, so i'd appreciate your opinion.

cheers,

--
Mark

Competition for fastest runs into hardware limits; competition for
slowest seems to have no limits beyond the diminishing patience of
time-keepers.

Don't go thinking our Groovy programs will necessarily be slower than
our Rebol or Io programs - they definitely have potential! :slight_smile:

http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?test=all&lang=groovy&lang2=io

···

On Mar 28, 10:16 pm, "M. Edward (Ed) Borasky" <zn...@cesmail.net> wrote:

Casey Hawthorne wrote:
> Benchmarks depend on the application you are testing against.

> What kind of application are you doing?

> Have you looked at Groovy?

> --
> Regards,
> Casey

The last time I looked (November 2007) Groovy was about the slowest
thing out there.

James Gray wrote:

Besides we all know C and OCaml smoke Python in speed. :wink:

So do Pascal and LuaJit (and even Lua).

that's an interesting point.

-Thufir

···

On Sat, 29 Mar 2008 13:03:48 +0900, James Gray wrote:

* It's generally pretty easy to optimize the 10% of the code where speed
is actually critical, even if you need to drop down to something like C
for just that part

Mark Ryall wrote:

It does seem a somewhat inflammatory statement to make on this list.

Clearly it is a completely subjective argument but i think if you want
incredible performance, C is a pretty good option but if you want to enjoy
writing code and produce code so beautiful that it will make your
grandchildren weep for joy, ruby is the best currently available option.

Well ... I beg to differ. If you actually read _Beautiful Code_, you will see beautiful code in many languages ... even Fortran, IIRC.

I disagree. It's too low-level and laden with pointers.
Use Pascal (FreePascal).

···

On Mar 28, 10:12 pm, Mark Ryall <mark.ry...@gmail.com> wrote:

[Note: parts of this message were removed to make it a legal post.]

It does seem a somewhat inflammatory statement to make on this list.

Clearly it is a completely subjective argument but i think if you want
incredible performance, C is a pretty good option

I agree these discussions are moot.

Hopefully the one who started it will reply, so far it looks
suspiciously as if it only served 7stud as further opportunity for
writing some more anti-ruby propaganda.

The biggest problem here is that for any application where one chooses
Python for SPEED it is hardly a convincing issue at hand. I dare claim
that ruby fits EXACTLY the same niche in the ecosystem. Look at
Javascript - it is not a great language, but it had a huge growth -
simply because the www grew and Javascript was ubiquitous.

It never ceases to amaze me how people put speed of "scripting"
languages into the center of attraction - one should go with lua if
speed is such a concern.

Or maybe pure C if it needs to be faster!

···

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

Absolutely - I suspected I might regret posting that statement. It's a bit
extreme and more than a little sycophantic given the circumstances.

Forums such as this seem sometimes to have an effect of making people take
more extreme points of view than they would in person - there're few topics
more boring than a language flame war.

I suppose i meant just to say that performance is not a factor i'd use to
choose between python and ruby - i'd pick the one that allowed me to write
code that more clearly expressed my intentions to its most important
audience - myself sometime in the future and other unsuspecting developers.

Ruby's expressiveness and flexibility has to some extent been achieved by
sacrificing performance (this statement would be true for python also). For
me, those benefits far outweigh the cost. I have the indefensibly
subjective opinion that ruby allows me to enjoy writing code that i imagine
other people could easily understand - perhaps making children cry isn't
probably something that i really want now that i've considered the matter
further.

Most of the time, choosing a language based on it having the fastest runtime
environment is probably very early premature optimisation.

If you have little experience using either, try to learn both and see which
suits your style.

···

On Sat, Mar 29, 2008 at 3:40 PM, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:

Mark Ryall wrote:
> It does seem a somewhat inflammatory statement to make on this list.
>
> Clearly it is a completely subjective argument but i think if you want
> incredible performance, C is a pretty good option but if you want to
enjoy
> writing code and produce code so beautiful that it will make your
> grandchildren weep for joy, ruby is the best currently available option.

Well ... I beg to differ. If you actually read _Beautiful Code_, you
will see beautiful code in many languages ... even Fortran, IIRC.