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

CF Performance vs. Foundation (Re: Worth it for an object to cache its own IMPs?)



Am 01.03.2004 um 06:30 schrieb Scott Stevenson:

>
> On Feb 29, 2004, at 2:29 AM, Markus Hitter wrote:
>
>> How about using local C functions? Working code goes into these 
>> functions while the method melts down to one line of code, calling 
>> one of these functions. Class-internally you use the functions while 
>> other classes use the methods. Should be even faster than IMP 
>> caching.
>
> Okay, so the question then becomes this:
>
> The code in question involves a lot of plist/dictionary/array parsing 
> and such. Is it a reasonable strategy to switch over to c functions 
> that use CF types?

Well, only 99% sure at the moment, but you should be able to access all 
Obj-C stuff, even "self", like before as long as your C function is 
inside the @implementation/@end pair. No need to switch at all.

> I've done some googling and mamasaming, but have found very little in 
> the way of discussions regarding Foundation vs. CF performance.

Saving a few hundred method lookups won't give you much, probably. If 
you'd do stuff like number crunching, mostly independant from system 
provided Frameworks, this could be another story. Anyway, doing some 
benchmarks on our own and/or firing up Shark is the most reliable way 
to get an answer.


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/