October 3rd, 2006

There's a reason why envelopes have backs

For some reason, people are upset that I don’t have hard data for the cost difference between “slow” and “fast” mode enumeration. I already did a back-of-the-envelope calculation that showed that fast mode reduces the total time to enumerate the items in a folder from five minutes to two seconds. That’s what’s so great about back-of-the-envelope calculations: They let you make decisions without actually having to implement every possible solution. Some quick estimation shows that using slow mode enumeration would be 200 times slower than fast mode. Does it really matter whether the speed-up is 195.1231 times or even 103.4761 times? Even if the estimate were off by an order of magnitude, a 20-fold speed-up is still worth it. Imagine if people had to carry out experiments for every possible optimization (both before and after) to prove that it was worthwhile. “Could you please deliver these letters?” “Sure, here let me grab them.” “Why are you doing that? Why don’t you take one letter at a time?” “Um, because it’ll be faster to take all of them at once so I don’t have to keep coming back here.”

“Do you have any hard data to support that? I’m not going to believe you until you show me some hard data.”

Topics
Other

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.