James Gray
3/29/2008 4:04:00 AM
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