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.

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.

Thanks again, Bill.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to