[Techtalk] Philosophical question: CPU/memory/disk cheaper than
Wim De Smet
kromagg at gmail.com
Tue Apr 10 11:19:26 UTC 2007
On 4/10/07, Kelly Jones <kelly.terry.jones at gmail.com> wrote:
> And now, a philosophical question:
> If I have a program that runs slowly (or hogs so much CPU/memory/disk
> that it slows other processes to a crawl), is it cheaper to:
> % Work to re-code the program to be more efficient and use less resources?
> % Increase the amount of CPU/memory/disk I have, or buy another
> machine just to run this program?
> Someone told me this was a no-brainer, and that it was a generally
> accepted fact that computer CPU/memory/disk was much cheaper than
> programmer time. True?
Eric S. Raymond claims in his book The Art of UNIX Programming that
you should only consider recoding the program if you think you'll be
able to make it an order of magnitude faster, i.e. 10, 100, 1000 times
faster depending on what you change. I think he's right in this
respect, labor is expensive and something less than an order of
magnitude faster is much cheaper to solve by buying hardware than
making a developer spend his/her time on it. It's a rule of thumb of
On the other hand that can be dangerous to say. I often come across
little tidbits of implementation details in gnome that I wonder
whether the gnome developers weren't a bit too eager to follow ESR's
advice on, e.g. they picked the stupid implementation that's fast to
do and easy to understand, but lots of instances of this means gnome
gets a reputation of being slow. Until someone rewrites it you'd say,
but that doesn't seem to happen a lot with such frequency (gnome file
picker I'm looking at you).
> Have there been studies done on this? Articles written?
I guess it's pretty easy to calculate. Find out how many man hours it
would approximately take, get the cost of that, compare it to the cost
of new hardware you need.
More information about the Techtalk