in reply to Re^2: How to optimize CPU and Memory usage?
in thread How to optimize CPU and Memory usage?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to optimize CPU and Memory usage?
by BrowserUk (Patriarch) on Nov 24, 2013 at 14:40 UTC | |
by CountZero (Bishop) on Nov 24, 2013 at 15:03 UTC |