[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 22:29:44 +0000 |
On 30 Jan 2011, at 21:35, Ivan Vučica wrote:
> That is awesome? Perhaps optimization pass could take a look if NSString
> subclasses exist and optimize if that is not the case as well?
There's already a profile-driven pass that will look at this in libobjc2 svn.
In fact, it doesn't check if there are subclasses, it checks if the instances
are always (or usually) the same class (so, even if they are GSSubString or
something, it will still work). If they are then it adds a cache for the
lookup and tries speculative inlining.
If the speculative inlining works, then it's slightly faster tan a C function
call that is not inlined (of course, any place where speculative inlining will
work, C static inlining will also work, so C will actually be faster).
>>> 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.
>>
>> Great! I am looking forward to this.
>
> Ditto!
I'll try to finish / commit it at FOSDEM then.
It's not a high priority, because message send overhead is rarely the
bottleneck for message sends to strings. I just put it together because I'm a
bit OCD when it comes to optimising stuff...
David
-- Sent from my IBM 1620
- Problem with NSString, Parag Deshpande, 2011/01/30
- Re: Problem with NSString, Stefan Bidi, 2011/01/30
- Re: Problem with NSString, Ivan Vučica, 2011/01/30
- Re: Problem with NSString, Lars Sonchocky-Helldorf, 2011/01/30
- Re: Problem with NSString, David Chisnall, 2011/01/31
- Re: Problem with NSString, Ivan Vučica, 2011/01/31
- Re: Problem with NSString, David Chisnall, 2011/01/31
- Re: Problem with NSString, Ivan Vučica, 2011/01/31
- Message not available
- Re: Problem with NSString, Ivan Vučica, 2011/01/31
Re: Problem with NSString, Ivan Vučica, 2011/01/30