[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Evolution or devolution?



On Dec 28, 2006, at 3:37 PM, Andy Lester wrote:
The question of "is it faster" is almost always irrelevant.
Processor time is orders of magnitude less expensive than programmer
time.

I agree 99% of the time. In this case we're trying to squeeze sub-second response out of massively complex systems under ever-increasing loads. I just spent a week saving a few seconds of processing time. But those few seconds will be saved 1/2 million times a day, so in this case it has been worth my time. Our customers don't want slow interfaces and we want to try to survive all future marketing whimsy. :)

You're right, profilers are very much our friend. Devel::Timer is handy too.

On Dec 28, 2006, at 4:17 PM, Andy Lester wrote:
On Dec 28, 2006, at 4:15 PM, Jay Hannah wrote:
   my @common = reverse sort @rates;
   return $common[0];

Really what you want here is $common[-1], rather than reversing to
get the first.

Ya. I abandoned that version altogether.

j