Hi Chirantan,

I used Ruby in last year's code jam, and I have been bitten only once
by Ruby's execution speed. Generally the algorithm you choose matters
more than raw execution speed of the language.

The only problem for which my solution failed on the large input was
actually the mouse trap problem being discussed here. I picked a
solution that is O(K * n), with K being 10**6, n being 100, and there
being 10 test cases. However, on my machine Ruby 1.8 failed to
complete within 8 minutes (by just a couple of minutes). I reran my
solution after the contest in Ruby 1.9 and then it finished well
within 8 minutes.

So a faster language may actually help and give you some leeway in
choice of algorithm, but generally it doesn't matter that much. Most
of my solutions needed just one or two minutes minutes on the large
datasets, so there was ample margin.

Peter

On Fri, Aug 14, 2009 at 6:17 AM, Chirantan<chirantan.rajh...@gmail.com> wrote:
>
> Ruby. Interesting. Even I am going to be choosing Ruby, however, I am
> worried about its performance as the speed of execution matters.
> Check  
> http://groups.google.com/group/google-code/browse_thread/thread/0bbe831f1d63d1ce/2c722566cbab2b25#2c722566cbab2b25
>
> On Aug 14, 5:35 am, Timothy Fisher <timot...@gmail.com> wrote:
>> Ruby here..
>>
>> 2009/8/13 Camilo González <czelaz...@gmail.com>
>>
>>
>>
>>
>>
>> > C++ owns Java !
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to google-code@googlegroups.com
To unsubscribe from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to