RE: objective-c / cocoa efficiency
RE: objective-c / cocoa efficiency
- Subject: RE: objective-c / cocoa efficiency
- From: Jeff Laing <email@hidden>
- Date: Wed, 9 Mar 2005 13:42:30 +1100
> In conclusion, let me sum up by saying that the original
> contention that I was responding to (that the person
> recommending switch/strcmp() was a twit), I'd disagree
> strongly without knowing all the facts because in *my*
> experience, its a valid and very efficient construct for
> specific problems.
(I meant to include this in my earlier responses concerning the efficiency
of hash tables, but didn't find the appropriate page till now)
In response to the early contention that the Foundation programmers are
super-efficient at what they did, I found
http://www.mulle-kybernetik.com/artikel/Optimization/opti-7.html to be an
interesting read, especially the discussion about how [NSString hash] works.
At least, its interesting to those who want to squeeze every last cycle out
of their machines. Or to argue about which code is "more efficient".
Whilst its interesting, I would *not* suggest worrying at this level for
lookup of keywords unless you have thousands of them, at which point it
would be better to look at tools like gperf
(http://www.gnu.org/software/gperf/gperf.html), to ensure that your hashing
algorithm will never lead to a collision.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden