[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Is ruby is faster than all Object oriented Scripting langs

bramu.ss@gmail.com

3/29/2008 2:02:00 AM

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.
38 Answers

Phlip

3/29/2008 2:25:00 AM

0

bramu.ss 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..

They will both generally be equally slow.

Now... why are both those languages so incredibly popular? Do you _really_
need that speed?

Some Ruby libraries, such as YAML, Hpricot, or Mongrel are surprisingly fast
because they coded their slowest parts in C. Not all of a program needs
speed. And most Ruby applications defer immediately to C libraries, such as
MySQL or a GUI, so their users perceive a responsive program.

Picking a language that's hard to program, like C++, just because an easier
solution _might_ be slow is an unreasonable response to fear. It's a form of
"premature optimization". Look that up!

--
Phlip


7stud --

3/29/2008 2:36:00 AM

0

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.
--
Posted via http://www.ruby-....

Iñaki Baz Castillo

3/29/2008 3:09:00 AM

0

El S=C3=A1bado, 29 de Marzo de 2008, 7stud -- escribi=C3=B3:
> 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.

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

=2D-=20
I=C3=B1aki Baz Castillo

markonlinux

3/29/2008 3:45:00 AM

0

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-....

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


cheers,

--
Mark

James Gray

3/29/2008 4:04:00 AM

0

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.

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. ;)

James Edward Gray II


Mark Ryall

3/29/2008 4:13:00 AM

0

[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 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-....
>
> thems fight'n words ;-)
> Just out of curiosity though what makes you prefer Python?
> I'm looking into both myself, so i'd appreciate your opinion.
>
>
> cheers,
>
> --
> Mark
>
>

M. Edward (Ed) Borasky

3/29/2008 4:41:00 AM

0

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.

Casey Hawthorne

3/29/2008 4:56:00 AM

0

Benchmarks depend on the application you are testing against.

What kind of application are you doing?

Have you looked at Groovy?

--
Regards,
Casey

ara.t.howard

3/29/2008 5:01:00 AM

0


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://codeforp...
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama




M. Edward (Ed) Borasky

3/29/2008 5:16:00 AM

0

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.