Re: [xml] Useless function calls in xmlSetProp()?


Stefan Behnel wrote:
Julien Charbon wrote:
- With old xmlSetProp():

$ ./test-setprop-big
Size:   8       Time:   000:000014397
Size:   16      Time:   000:000003429
Size:   32      Time:   000:000003164
- With "new" [now current] xmlSetProp():

$ ./test-setprop-big
Size:   8       Time:   000:000004981
Size:   16      Time:   000:000001847
Size:   32      Time:   000:000000906
 [Yes, attributes with value size of 1 MB are unrealistic, it is just to
show how xmlSetProp() scaled before setprop.patch]

There is a huge difference for small strings, though. Any idea why the (most
common) really short string values take three times as long as the somewhat
longer ones? Or is it just the usual benchmark uncertainty?

What is the time scale you used above anyway?

The time scale is "seconds:nanoseconds". Thus, "000:000004981" means 0 secondes and 4981 nanoseconds and "078:606054215" means 78 seconds and 606 milliseconds.

Here times value on tiny size are not significant [too much uncertainty due to CPU cache, memory cache, etc...], the important point on these values is how they scale depending on XML attribute value size.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]