Problems? Is your data what you think it is? | |
PerlMonks |
Re^3: How to optimize CPU and Memory usage?by CountZero (Bishop) |
on Nov 24, 2013 at 14:13 UTC ( [id://1064118]=note: print w/replies, xml ) | Need Help?? |
You are right about cars, but I do not see the analogy with computers. What is the benefit of spending hours in optimizing and then shaving off 2 seconds and 100 MByte from a program that before optimization ran 5 seconds and used 250 MByte. Do you switch your computer on and off for each script you want to run? That is what I mean with "premature" optimization. My laptop is "on" the whole day I am in the office and the scripts I run really only use spare cycles and empty memory. How much power does a computer need to run an email client and an editor or a spreadsheet? If I can push CPU use above 25% with my "normal" work, I will have blisters on my fingers (and more typos than correctly typed words). CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James My blog: Imperial Deltronics
In Section
Seekers of Perl Wisdom
|
|