[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?)
On Mar 1, 2004, at 2:18 AM, Izidor Jerebic wrote:
> 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?
Basically, I have hierarchy of arrays and dictionaries that are all
loaded into memory at startup. As the program runs, I need to get at
various parts of the structures very frequently. Right now, it's just
too slow.
> 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....
It's not really a parser I need per say -- I'm not opening files. It's
fine to have Foundation do all the parsing initially. What I'm trying
to figure out is how I can get faster access to a particular string
somewhere in the structure that's already in memory. At the moment, it
seems like the best bet is going to be to switch over to plain C
structures. It would be really helpful if there was something in CF or
even third party that could help automate this process, but maybe it's
not a generalized enough problem.
On Mar 1, 2004, at 3:15 AM, Markus Hitter wrote:
> Anyway, doing some benchmarks on our own and/or firing up Shark is the
> most reliable way to get an answer.
Shark hasn't been very helpful on this particular project as of yet.
It does tell me generally where the most time is being consumed, but
that information wasn't particularly surprising. One of the most
valuable aspects of shark seems to be the per-line performance
analysis, but at the moment, it's only highlighting one or two lines of
code and making them fully yellow with "100%" marker in the leftmost
column. I found this particularly strange when it highlighted a line
that was simply "++i". The line went away when I changed it to "i++",
which seems like a bug. I can't imagine a simple increment like that
would be consuming much CPU time anyway, particularly considering all
the other complicated stuff going on around it.
- Scott
--
Tree House Ideas
http://treehouseideas.com/