Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much


by mr_mischief (Monsignor)
on Apr 17, 2008 at 16:10 UTC ( #681218=note: print w/replies, xml ) Need Help??

in reply to CPU cycles DO NOT MATTER!

What if the code is running on far more than 50 machines? If I save 10% on 500 machines or 1% on 5,000 machines, is that worthwhile?

I think Kernighan and Pike came up with the best metric for when to optimize in The Practice of Programming. They say that the time spent optimizing should never outweigh the run time saved through optimization unless you're against a hard deadline the software can't meet.

You might want to weight this for the price of computer time vs. programmer time, so if your programmer's time is worth $50k a year and the computer time spent running the software is $5k a year, don't let them spend more than a man month optimizing. Since the computer will probably get upgraded at some point, make it 2 man weeks. This way, your $2k investment in your programmers pays off the first year and to some extent every year after.

For a program that runs on one machine once in a while, throw hardware at it. For something that's the sole application of a farm of hundreds of servers, you might save tens of of thousands of dollars every year by spending a man week doing the simple, obvious optimizations.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://681218]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2022-12-07 16:41 GMT
Find Nodes?
    Voting Booth?

    No recent polls found