On May 10, Peter Scott said:

>At 05:55 PM 5/10/01 -0400, Jeff Pinyan wrote:
>>That sorting method does a lot of work -- that is, it does things more
>>than once.  I suggest you use a schwarztian transform, or the Orcish
>>manuever, to increase speed.
>
>I'd like our beginners to take home the message that you shouldn't optimize 
>for performance until it's clear you need to.  Otherwise you're just 
>wasting programmer time.  Premature optimization is the root of, etc.

While I agree, it's a good idea to know why things are slow, and why
things can be improved.  It's also a good idea if the user knows WHY

  sort { function($a) <=> function($b) } ...

does a lot of work.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734

Reply via email to