TooMuchBlue

My collection of rants and raves about technology, my kids and family, social/cultural phenomena, and inconsistencies in the media and politics.

2006-04-21

Performance War

Quick hit on coding techniques.

From Rico Mariani's blog about performance, a nicely thought out method for eeking more performance out of an already properly tuned application.

#4 Restate the various counts in terms of input and output
Once you've done the counting, trends tend to appear. "This function is called once per byte", "This function is called 3 times per byte", "There are two registry reads per line of input" etc. Some of these will probably leap right off the page: e.g. "Why do we call the process character function twice for every byte of input, that can't be right." These are the kinds of things you're looking for. But let's move on to...

#5 Characterize each of the costs as either "real forward progress" or "bookkeeping"
A lot of what we do in any given program is bookkeeping, some of which is ultimately necessary but is nonetheless bookkeeping. We can't get rid of work that is fundamentally necessary to solve the problem but we can target the bookkeeping for simplification or eradication.

[via Eric Willis]

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home