[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?)
- Subject: CF Performance vs. Foundation (Re: Worth it for an object to cache its own IMPs?)
- From: izidor.jerebic at siol.net (Izidor Jerebic)
- Date: Mon Mar 1 02:16:42 2004
- In-reply-to: <89CCD76B-6B41-11D8-A9D3-003065CA9E5A@mac.com>
- References: <F556E9E9-6A8B-11D8-85D8-003065CA9E5A@mac.com> <2145404F-6AA2-11D8-B36A-00039340BDFC@jump-ing.de> <89CCD76B-6B41-11D8-A9D3-003065CA9E5A@mac.com>
On Mar 1, 2004, at 6:30 AM, Scott Stevenson wrote:
>
> 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? In other words, is there going to be much of a
> difference if I'm still using CF objects inside the function, or do I
> need to drop down all the way to plain old ansi c strings and
> structures to see any material speedup?
>
> I've done some googling and mamasaming, but have found very little in
> the way of discussions regarding Foundation vs. CF performance.
>
What do you mean by parsing? Reading from a file and building a tree
structure or walking the structure already built? Extracting parts of
files or reading complete files as trees of objects for later perusal?
If you need a very fast file parser than probably flex/bison will
generate the fastest custom parsing code for you - but it is plain
C....
On the other hand, there is a lot of I/O and lexical analysis and other
things going on when reading a file and converting byte stream to
something else, so I doubt that message sending overhead can be noticed
at all...
izidor