<?xml version="1.0" encoding="windows-1252"?>
<node id="276012" title="Out-Of-Date Optimizations? New Idioms? RAM vs. CPU" created="2003-07-20 05:29:23" updated="2005-07-19 16:19:06">
<type id="120">
perlmeditation</type>
<author id="272239">
liz</author>
<data>
<field name="doctext">
Historically, Perl has always favored using more memory over using more CPU.
&lt;P&gt;
Is this still the best optimization with new CPU architectures, specifically the ones with large CPU caches?  I believe it not to be.  But Perl5.X won't be changed for that.
&lt;P&gt;
I have the impression that &lt;a href="http://parrotcode.org"&gt;Parrot&lt;/a&gt;'s VM is using a register architecture just for the reason of taking advantage of the large CPU caches.  But &lt;a href="http://www.poniecode.org/"&gt;Ponie&lt;/a&gt; (Perl5 running on Parrot) isn't here yet.
&lt;P&gt;
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).  &lt;B&gt;Even when using today's Perl&lt;/B&gt;.
&lt;P&gt;
Liz
&lt;p&gt;&lt;small&gt;Title edit by [tye] &lt;!-- w/o the hyphens, I thought you were talking about having run out of "date optimizations" --&gt;&lt;/small&gt;&lt;/p&gt;</field>
</data>
</node>
