• 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: Message Forwarding Overhead / Performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Message Forwarding Overhead / Performance


  • Subject: Re: Message Forwarding Overhead / Performance
  • From: Bill Bumgarner <email@hidden>
  • Date: Tue, 28 Oct 2008 15:37:03 -0700

On Oct 28, 2008, at 3:16 PM, Jerry Krinock wrote:
On 2008 Oct, 28, at 9:09, Bill Bumgarner wrote:
That would not surprise me. An absolute microseconds overhead isn't a terribly useful measure without knowing the total # of microseconds. In general, measuring as a factor of speed -- 1.2x 20x 200x is more widely applicable (tends to be more consistent across different CPUs, for example).

Well, since you asked..... :))

Actually, I calculated this first but it seemed too ridiculous to publish.

                        Time to send message and
                       do 10,000 integer additions
                       ---------------------------
 Direct messaging         250 microseconds typical
 Message Forwarding    300000 microseconds typical
 "X" factor:             1200 X

Obviously this is because the "real work" was trivial. But I concocted my test that way purposely. The result of "20 microseconds per message on a 2006 Mac Mini" gives me a measure which I can use to ^predict^ performance in this and future applications ^before^ writing code.

Oooh... trivial tests! I like those! Can you share the code?

So... sure... message forwarding is slow. But does it matter in your application?

Early in the design process you need to make some guesses based on experience. Since I have an alternative to in this case, the decision is to use the alternative.


Roughly, the lesson is: Don't use message forwarding for "actual work". I was just wondering if anyone had ever found otherwise.

I'd rephrase that for archival purposes: Don't use message forwarding in tight loops or other repetitive use patterns. It doesn't make sense to have to figure out who is really going to do the work on each pass through a loop when figuring out who is so terribly expensive.


b.bum

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Message Forwarding Overhead / Performance
      • From: Jerry Krinock <email@hidden>
References: 
 >Message Forwarding Overhead / Performance (From: Jerry Krinock <email@hidden>)
 >Re: Message Forwarding Overhead / Performance (From: Bill Bumgarner <email@hidden>)
 >Re: Message Forwarding Overhead / Performance (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Getting localized NSPredicateEditor
  • Next by Date: Re: Getting localized NSPredicateEditor
  • Previous by thread: Re: Message Forwarding Overhead / Performance
  • Next by thread: Re: Message Forwarding Overhead / Performance
  • Index(es):
    • Date
    • Thread