[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C and Smalltalk; speed of message send

From: Richard Frith-Macdonald
Subject: Re: Objective-C and Smalltalk; speed of message send
Date: Thu, 19 Aug 2004 09:01:51 +0100

On 19 Aug 2004, at 06:02, Travis Griggs wrote:
Also potentially fairly heavy, though a common choice.  I remember
people complaining about NSString's performance compared to char* when
Foundation was introduced.  However, NSString is really for "human
readable" text, whereas char* is often more for "tokens", or really
just byte-sequences.

Well, the problem is, you can't use char*'s as Dictionary keys. You need an object. I guess we could roll our own lightweight string object for use as a key. Then we'd have to manage all of the char* life cycle ourselves.

OpenStep/GNUstep/MacOS-X has NSMapTable for this.

Actually, GNUstep also provides the non-standard macros in GSIMap.h for cases where performance is *really* critical, but NSMapTables are a good compromise.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]