|
From: | Richard Frith-Macdonald |
Subject: | Re: Objective-C and Smalltalk; speed of message send |
Date: | Tue, 10 Aug 2004 12:31:59 +0100 |
On 10 Aug 2004, at 12:15, Alexander Malmberg wrote:
As a final note, recent oprofile data from Matt Rice puts objc_msg_lookup at 15%-20% of execution time in messaging heavy -gui code. In other words, if message lookup was free, our programs would be ~20% faster. Significant, yes, but 20% really isn't that much. Thus, I maintain that message sending is really quite cheap. :) Except for performance critical code, I'd rather take a 20% performance hit than uglify my code with IMP caching, and I wouldn't shy away from messaging heavy code. :)
I'd like to add that I *strongly* agree with Alexander here.I've had a lot of experience with this sort of optimisation over the years,
and while it's undoubtedly important for some of the key classes in the base library, I now believe I tended to over-do the optimisations some years ago when I was less experienced. Optimisation efforts should be directed to improving algorithms rather than speeding up messaging by caching method implementations.
[Prev in Thread] | Current Thread | [Next in Thread] |