[AWS] Non-lineal parsing time with Templates_parser

Jacob Sparre Andersen sparre@nbi.dk
Fri, 6 Feb 2004 11:45:15 +0100 (CET)


Alejandro. R. Mosteo Chagoyen wrote:

> Rows    Time
> 100     0,138
> 200     0,399
> 300     1,651
> 400     4,33
> 500     8,275
> 600     13,564
> 700     19,509
> 800     27,501
> 900     36,278
> 1000    48,189

> [...] almost perfectly cuadratic.

> Someone knows the cause?

I would guess that it is due to your compiler's
implementation of Ada.Strings.Unbounded.  With GNAT (the
versions I have tried) the cost of replacing a slice in an
Unbounded_String grows roughly linear with the length of the
string.  This would result in the quadratic growth in the
total processing time that you observe.

Greetings,

Jacob
-- 
"This page inadvertently left blank."