Perl Monk, Perl Meditation | |
PerlMonks |
Re: Re: Re: Strange memory growth?by liz (Monsignor) |
on Nov 07, 2003 at 22:38 UTC ( [id://305472]=note: print w/replies, xml ) | Need Help?? |
Please, only if you've anaylized the program and you really are in danger of running out of memory (including swap space) from the conditionals you're doing. Anything else is a micro-optimization.
Possibly. But please remember when Perl is used in a mod_perl environment with a prefork MPM, you want to keep as much memory shared between children. This behaviour of Perl is very counter-productive in that environment: I'd rather take a little CPU hit for the overhead of creating the lexical again, and not unsharing any further memory, than have the current situation. More generally, I think the current behaviour of Perl to use more memory rather than more CPU, becomes more and more counter-productive as the speed of accessing memory is growing slower than the speed of the CPU with each new generation of systems. Liz
In Section
Seekers of Perl Wisdom
|
|