Hello all,
on a side note,
using my own alloc in a pascal program on mac classic
back in 1991, i speeded up the program up to
* * * * 20 FOLD. * * * *
avoiding the allocation / destroy did the trick.
(just constantly passing on the 'object'.)
I hope this is sufficient of an incentive to see
if anything can be done here....
I am sorry I dont have the time to assist.
Eric de Haan, senior designer, Allshare Finance
http://www.allshare.nl
Makers of QUESTOR, the complete banking solution,
and Aediles, the All-media banking solution.
On Thu, 6 Apr 2000 12:31:49 +1200, Eliot Muir wrote:
>One area that could be an easy one to save time in
>is to use smart pointers in the fEntityDeclPool
>
>That way you could avoid this repeated initialization:
>
> fEntityDeclPool->put(new DTDEntityDecl(gAmp, chAmpersand, true, true));
> fEntityDeclPool->put(new DTDEntityDecl(gLT, chOpenAngle, true, true));
> fEntityDeclPool->put(new DTDEntityDecl(gGT, chCloseAngle, true, true));
> fEntityDeclPool->put(new DTDEntityDecl(gQuot, chDoubleQuote, true, true));
> fEntityDeclPool->put(new DTDEntityDecl(gApos, chSingleQuote, true, true));
>
>In pseudo code
>
> COLreferencePtr<DTDEntityDecl> fAmpersandEntity = new DTDEntityDecl(gAmp,
> chAmpersand, true, true);
>:
>:
>fEntityDeclPool->put(fAmpersandEntity)
>
>This way you only new and delete the fAmpersandEntity etc. once in the app -
>when the fEntityDeclPool is
>cleared it merely removes it's reference to the object - the object is not
>destroyed, ready for reuse when needed.
>Much more efficient
>
>This an issue throughout the parser whenever you are repeated re-allocating
>the same static strings etc.
>
>--
>Eliot Muir, Technical Director iNTERFACEWARE
>mailto:[EMAIL PROTECTED]
>Voice 64-21-333068 http://www.interfaceware.com
>
>Makers of iNTERFACEWARE Chameleon
> "Program to the iNTERFACE not the implementation"