Re: Memory allocation overhead

Colin Paul Adams <[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Message-ID <[email protected]>
>>>>> "Eric" == Eric Bezault <[email protected]> writes:

    Eric> technique that I use is to try to reuse objects, rather than
    Eric> giving them back to the GC and creating new ones right
    Eric> after. In gec, I have AST visitor classes to implement the
    Eric> different Eiffel "Degree" compilation passes. They all try
    Eric> to keep the intermediary objects that they need to process a
    Eric> given imput class. They reuse these intermediary objects
    Eric> when processing the next input class, and so forth.

Can you point me to a specific example?

I am currently trying this with the iterators used to evaluate XPath
sequences. I am retaining copies on a once DS_ARRAYED_STACK. So far,
this is actually increasing the runtime (but it appears sensitive to
the size of the stack, so I am currently trying with just a DS_CELL to
see if this is better).
-- 
Colin Adams
Preston Lancashire

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.