On Tue, Dec 10, 2002 at 10:59:03PM +0200, Dekel Tsur wrote:

> > > "short" makes me go: "Hu! Why? Anything special going on here?"
> > 
> > why not save some memory ?
> 
> The saving is negligible (compared to the memory already used by the map, and
> the memory used to hold the font).

We have to hold the font already, the map is the only overhead. But I'm
not mega-bothered

> > Because we have to modify the std::map
> 
> You can declare the map mutable.

This seems a dubious use at best to me. It's not being used to keep
const  available on a logically-const method ...

> PS: A possible optimization is to hold in addition to the map
> an array that stores the widths for the unicode chars 32-127 (the most
> common chars).
> Of course, I don't know if this will give any speedup, or if it worths the
> extra code.

Well, I'm burned out after 4 or  5 different implementations...

regards
john

-- 
"Saying that taste is just personal preference is a good way to prevent
disputes. The trouble is, it's not true."
        - Paul Graham

Reply via email to