On Thu, Feb 08, 2001 at 06:05:58PM +0100, Lars Gullik Bj�nnes wrote:
> Dekel Tsur <[EMAIL PROTECTED]> writes:
> | 
> | The memory consumption can be (slightly) reduced by deleting the line
> |  text.reserve(500)
> 
> Perhaps we should just remove this, I don't think it buys us much.
> Anybody care to run some tests?

The time you gain by preventing the vector resizing is really insignificant
compared to the time for redrawing the paragraph on screen.

> OTOH by using the reserve we are likely to use _less_ memory on
> paragraphs close to ~500 characters.

You only gain 12 bytes for paragraphs with 257-500 chars.

Reply via email to