• 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: Cocoa's custom class delegate conventions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa's custom class delegate conventions


  • Subject: Re: Cocoa's custom class delegate conventions
  • From: Marcel Weiher <email@hidden>
  • Date: Sat, 14 Jun 2003 11:55:06 +0200

On Saturday, June 14, 2003, at 11:31 Uhr, Bill Cheeseman wrote:

on 03-06-14 4:24 AM, Sailor Quasar at email@hidden wrote:

For that matter, once you've confirm that [delegate
respondsToSelector:@selector(thingWillDoStuff:)], why in the world
can't you simply then call [delegate thingWillDoStuff:self] directly?
It's an id after all, and I believe one of the rules of ids is that you
can send any selector to them that they recognize.

I suppose that performSelector is faster because it bypasses the Objective-C
runtime message resolution overhead.

Nope. It is slower because it goes through the messager twice: once for sending 'performSelector:', and once for the selector itself.

I've been told that there is some other "magic" optimization done in Cocoa,
but I don't know what it is. Something about caching the selectors?

Caching the selectors wouldn't be useful. IMP-caching would be.

Marcel


--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
f0249ab8b1af193ef5addcf39fdff5ca
_______________________________________________
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: Cocoa's custom class delegate conventions
      • From: Bill Cheeseman <email@hidden>
References: 
 >Re: Cocoa's custom class delegate conventions (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Cocoa's custom class delegate conventions
  • Next by Date: Where to put writable files available to all users
  • Previous by thread: Re: Cocoa's custom class delegate conventions
  • Next by thread: Re: Cocoa's custom class delegate conventions
  • Index(es):
    • Date
    • Thread