pauldacus / gmail.com wrote:
> Ruby DOES kick butt!
> 
> I'm still wondering why benchmark shows such a different result from
> what I'm finding by running Sylv', Lyndon's & my solution from the
> command line, with 110,000 element arrays, with 20,000 dup's.
> 
> Mine comes in at 0.24 sec, Sylv's @ 0.45 sec, and Lyndon's at 12.95
> sec, and these are all very consistent, w/in +- 0.01 sec.  These are
> WAY off of benchmark tests, which shows Lyndon's script just killing
> all others....
> 
> What I'd like to see is if Perl is faster than Ruby at this job... I
> have a friend who says it is cuz Perl is more 'seasoned' and is
> optimized like crazy.  Curious about that, and this thread just cuz
> array & string processing seem to be half the body of most of my
> scripts, and doing what is fast is important... not that I'd switch to
> Perl.  I started a Ruby script a few days ago to use 'zlib' to
> recusively zip up files, and it was dead slow due to some very
> inefficient array processing on my part.  The thing took over a day to
> run.  This thread has been awesome....

Absolutely! The algorithm is very important and often it is the case
that you can change a too-slow algorithm out before resorting to more
drastic measures.

E