Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by Juerd (Abbot)
on Aug 09, 2003 at 16:35 UTC ( #282442=note: print w/ replies, xml ) Need Help??


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
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' }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://282442]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-11-27 10:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (183 votes), past polls