Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Is it wrong?by Abigail-II (Bishop) |
on Aug 26, 2003 at 20:51 UTC ( [id://286862]=note: print w/replies, xml ) | Need Help?? |
to learn PERL What's this language "PERL" you are talking about?
Am I wrong to disagree with the instructor and feel that the more memory a program requires, the slower it is likely to run? Yes. You would also be wrong in believing that the more memory a program requires, the faster it runs, or that the amount of memory required doesn't influence the running time. Memory usage influences running time. Accessing the memory takes time. More memory means that you are more likely to get cache misses, increasing the running time. More memory may mean more swapping, increating the running time as well. OTOH, using less memory could mean having to recalculate stuff more often, also increasing the memory time. Less memory could mean less buffers, meaning having to consult slow resources more often, increasing the memory time. So, whether more memory means a program runs slower or not depends on many factors, and you can't simply say it runs slower or faster. Abigail
In Section
Seekers of Perl Wisdom
|
|