|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
My basis is that I have done similar things myself and I have watchedProgrammers are notorious for optimizing the wrong code.What is your basis for that statement? which programmers are you
referring to?
others do it.
Not only that, but I have read nearly identical assertions
in nearly every single textbook I have that deals with programming
However, many times people will start optimizing every piece of code in
sight, not realizing that the real bottle neck is somewhere totally
different (in another thread perhaps) and they are making little or no
difference in the running time.
As an example, how about we consider a list of windows on screen. Lets say
that we want to keep the list sorted and we want to be able to add new
windows in the middle of the list. Now lets assume that each window has
one of those fancy glowing buttons that makes Cocoa apps so pretty. Now if
you decide to be super efficient, you spend your time making the perfect
data structure for this [...]
[...] 1000 windows all with pulsating buttons needing to be updated at once.
There was a post on this list a few days
ago about how adding one button caused the processor usage to skyrocket.
Now consider having 1000 of these. Is it really going to matter that it
took a full second to copy 500 of those entries (on average) to delete
that one entry.
A second is most likely far longer than it would really take, but for the sake of argument, lets stick with 1.
| References: | |
| >Re: [OT] Premature optimizations (was: Where is NSList?) (From: Stephen Checkoway <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.