[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fast enumeration
From: |
Fred Kiefer |
Subject: |
Re: Fast enumeration |
Date: |
Wed, 09 Feb 2011 21:16:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 |
Am 09.02.2011 11:05, schrieb David Chisnall:
> On 9 Feb 2011, at 06:44, Riccardo Mottola wrote:
>
>> If you want to expose this macro by default in base, I'd refrain
>> from that. However, I guess it can be exposed if Libobjc-2 is used:
>> the correlation with the newer library version and c99 is probably
>> 1. Pre-C99 support (which I guess sums up in gcc-2.95) can be left
>> to Objc-1.x and in this case the fast enumeration macro could be
>> hidden.
>>
>> Of course, if Nikolaus comes up with a generic solution, no
>> objections at all.
>
> I'm already using the GSFastEnumeration macros in -base, and have
> been for about six months. If they are relying on C99 features that
> I didn't notice, no one has reported compilation failures in this
> time.
>
> Unlike the enumerator solution, this gives the same performance and
> thread-safety as fast enumeration. I'm not sure what the problem is.
> I didn't put them in the public headers location, because emulating a
> compiler in the preprocessor seems ugly to me, but if they're
> generally useful then we can move them there.
>
> I also have some similar macros that provide a fast-enumeration style
> macro for iterating over characters in a string, which I should
> probably add in the same place - there are a few places where we are
> doing very slow string iteration in -base.
I think Riccardo was referring to the macros that where proposed by Jens
in his original mail. You know how he reacts on seeing C99 mentioned.
As far as I know your macros should be fine even by Riccardo's standards
and I really would like to see them in a public header. We should let
Richard decide which one.
Not sure about the string iteration though.
Cheers
Fred
- Re: Fast enumeration, (continued)
- Re: Fast enumeration, Ivan Vučica, 2011/02/04
- Re: Fast enumeration, Jens Ayton, 2011/02/04
- Re: Fast enumeration, Nicola Pero, 2011/02/04
- Re: Fast enumeration, Fred Kiefer, 2011/02/07
- Re: Fast enumeration, Jens Ayton, 2011/02/07
- Re: Fast enumeration, Dr. H. Nikolaus Schaller, 2011/02/07
- Re: Fast enumeration, Jens Ayton, 2011/02/07
- Re: Fast enumeration, Dr. H. Nikolaus Schaller, 2011/02/07
- Re: Fast enumeration, Riccardo Mottola, 2011/02/09
- Re: Fast enumeration, David Chisnall, 2011/02/09
- Re: Fast enumeration,
Fred Kiefer <=
- Re: Fast enumeration, Jens Ayton, 2011/02/09
- Re: Fast enumeration, David Chisnall, 2011/02/07
- Re: Fast enumeration, Fred Kiefer, 2011/02/07
- Re: Fast enumeration, Ivan Vučica, 2011/02/04
Re: Fast enumeration, David Chisnall, 2011/02/04