Stephen Waits wrote:
> E. Saynatkari wrote:
>> 
>> Post the code somewhere, there might be room for improvement
>> in the algorithm though it will still be considerably slower.
> 
> It looks, to me, like he attached his code to the OP.

Ah, caveat forum-user!

> Regardless, it doesn't matter.  Algorithmic improvements may help both
> the C++ and Ruby versions - but it's not going to change the fact that
> one is a relatively low-level language, compiled to native machine code,
> and the other is an interpreted dynamic language.  To compare them is
> either ridiculous, or more likely in this case, simply ignorant.

In general, sure. Ruby will afford doing some things better
than most C++ coders would (or would bother to), so it might
be worth looking into.

Plus, if one were to get the Ruby time down to 15 seconds, it
would still be worth it even if the C++-version were cut to 0.15
seconds (mainly because it would probably take at least twice
as long to implement in C++).

> --Steve


E

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