discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Problem with NSString


From: David Chisnall
Subject: Re: Problem with NSString
Date: Sun, 30 Jan 2011 17:16:15 +0000

On 30 Jan 2011, at 16:51, Ivan Vučica wrote:

> while(![@"Quit" isEqualToString:word2])
> or
> while(![word2 isEqualToString:@"Quit"])


Straying wildly off-topic, but the first form is preferable from the compiler's 
point of view.  It means that the class of the receiver is known at compile 
time, which means that we can have a better stab at speculative inlining.  

This is currently only done in an experimental optimisation pass on my machine, 
but it will probably become one of the standard Objective-C passes used by 
clang for the GNUstep runtime sometime this year.

David

--
This email complies with ISO 3103




reply via email to

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