in reply to Re: Re: (nrd) finding highest number
in thread finding highest number

Oddly enough, it's more efficient to use sort rather than an explicit Perl loop for for up to a dozen or two elements, if I recall the benchmarks.

Of course, List::Util has a max function, which would be faster still.

But don't be so quick to optimize... you may be unoptimizing.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: Re: Re: (nrd) finding highest number