Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare()
Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare()
- Subject: Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare()
- From: Allan Odgaard <email@hidden>
- Date: Mon, 23 Feb 2004 04:20:15 +0100
On 22. Feb 2004, at 22:46, Louis C. Sacha wrote:
Part of the issue might be that there are regular objective-C messages
happening within the compare: implementation. So using an IMP only
shaves off the overhead for the intial message, and you still have the
difference between the internal messages in compare: [...]
Yes, that is something I did not consider. Still, I know that
obj_msgSend is not constant in time, but shaving off the initial
message saved 0.2 seconds, using CFNumberCompare saves another 3.3
seconds -- that would (roughly) imply that NSNumber needs to send
around 16 messages to retrieve the value of its argument (if ObjC
messages were the overhead alone).
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.