• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Speed comparison: compare:, methodForSelector: & CFNumberCompare() (From: Allan Odgaard <email@hidden>)
 >Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare() (From: Public Look <email@hidden>)
 >Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare() (From: Allan Odgaard <email@hidden>)
 >Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare() (From: "Louis C. Sacha" <email@hidden>)

  • Prev by Date: Playing a particular tone
  • Next by Date: Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare()
  • Previous by thread: Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare()
  • Next by thread: Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare()
  • Index(es):
    • Date
    • Thread