• 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: Sailor Quasar <email@hidden>
  • Date: Mon, 23 Feb 2004 02:09:27 -0500

On Feb 22, 2004, at 10:33 PM, Allan Odgaard wrote:
There is discussion of the merits and relative performance of using function pointers. There is discussion of the implementation of message sending. There is description of profiling to find out for sure where the time is being spent instead of guessing. There is discussion of the specific issues having to do with Foundation classes and class clusters such as NSNumber.
Sorry, but I am aware of all these things, and I do not think they shed light on why compare:, when invoked using a function pointer (in a concrete subclass), is that much slower than CFNumberCompare.

I could follow the example of the page you link to and disassemble compare:, I don't know if that was your intent? if so, I guess there is little reason for this mailing-list if the answer is that I should go look at the assembler source for things I do not understand! ;)

Well this isn't quite a matter of understanding of the APIs and their effects, which is what this list is for. You're now talking about in-depth optimizations while still retaining Objective-C (-ish) code, and optimizing Objective-C means knowing what messages are being thrown all over the place; since we don't have Foundation or AppKit source code, we have to make do with assembly. Aside from the author's lack of comprehension of dyld stubs (which, if I understood the Mach-O book correctly, have to do with the way shared libraries are implemented in Darwin), I found the page in question to be extremely informative and very well written, if dated a bit far back relative to now.

-- Sailor Quasar, just another player in The World
"Come with me in the twilight of the summer night for awhile"
Email: email@hidden
_______________________________________________
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.

  • Follow-Ups:
    • Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare()
      • From: Nat! <email@hidden>
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: Public Look <email@hidden>)
 >Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare() (From: Allan Odgaard <email@hidden>)

  • Prev by Date: NSTableView [solved]
  • Next by Date: Re: bindings with NSView subclass
  • Previous by thread: Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare()
  • Next by thread: Re: Speed comparison: compare:, methodForSelector: & CFNumberCompare()
  • Index(es):
    • Date
    • Thread