Boost logo

Boost :

From: Carlo Wood (carlo_at_[hidden])
Date: 2002-08-30 11:34:10


On Fri, Aug 30, 2002 at 06:12:56PM +0200, Daniel Frey wrote:
> Rob Stewart wrote:
> >
> > Given that your demangling logic will be invoked in almost every
> > use case strictly for error reporting, performance is not an
> > issue. Therefore, any performance concern wrt copying strings is
> > moot.
>
> It's not just about performance. Errors may occur when the system is
> short of memory, thus you should try be avoid memory allocations
> whenever possible (OK, string will most likely not be a real problem,
> put you never know...).

Well, I am willing to do more string copies if really
necessary. I used to do a demangle for function names that
malloc et al was called from every call to malloc. But
in the mean time I wrote a cache for that so that each function
that calls malloc/new will only be demangled once.

But... I like the iterator idea a lot more and will hopefully
do that :)

-- 
Carlo Wood <carlo_at_[hidden]>

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk