http://www.perlmonks.org?node_id=282442


in reply to Out-Of-Date Optimizations? New Idioms? RAM vs. CPU

So I was wondering if there are monks out there that have found any (new) coding idioms in (today's) Perl that favor using CPU over memory, and have found them to be faster than a (old) coding idiom (favoring memory over CPU).

Quite often, a non-ST sort is faster than a ST. It depends on the data, the machine and the resources available on that machine. But many people (including me, I noticed) write STs without thinking or benchmarking.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

  • Comment on Re: Out-Of-Date Optimizations? New Idioms? RAM vs. CPU

Replies are listed 'Best First'.
Re: Re: Out-Of-Date Optimizations? New Idioms? RAM vs. CPU
by diotalevi (Canon) on Aug 10, 2003 at 02:12 UTC

    I don't know about you but I take care to use Guttman-Rossler if I can instead of the full ST. Or even more frequently I write it as a normal sort (with code block) and only go back if the profiler says I should. And it never has outside of toy code.

      I don't know about you but I take care to use Guttman-Rossler if I can instead of the full ST.

      I never knew this technique had a different name. Although I often write a full ST, when I really need speed, this is what I already do. It's good to know that it has a name. Thanks.

      Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }