This is Messaging-Overhead... in view mode; [Up]
Date: Sun 04-Nov-1991 15:14:35 From: songer@ei.ecn.purdue.edu (Christopher M Songer) Subject: Messaging Overhead... OK, How many times do I have to do: [[MyScrollView docView] do_some_textview_thingie]; to make: textid=[MyScrollView docView]; worthwhile? Is it anytime over one? Over two? Never bother??? Thanks! -Chris songer@ecn.purdue.edu
Date: Sun 11-Nov-1991 00:09:07 From: tim@monolith.amd.com (Tim Olson) Subject: Re: Messaging Overhead... In article <1991Nov4.151435.3758@noose.ecn.purdue.edu> songer@ei.ecn.purdue.edu (Christopher M Songer) writes: | OK, How many times do I have to do: | | [[MyScrollView docView] do_some_textview_thingie]; | | to make: | | textid=[MyScrollView docView]; | | worthwhile? Is it anytime over one? Over two? Never bother??? Emperical evidence shows that messages are about 3.5 to 4 times slower than "equivalent" procedure calls, and much slower (13x) than direct manipulation via a pointer (for very simple operations). However, you should probably profile your code to determine where the *real* hotspots are, rather than concentrating on these types of microoptimizations. Then and only then should you look at this type of Common Subexpression Elimination.
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.