Iterator benchmark

Cyrille Berger cberger at cberger.net
Wed Jun 10 13:56:25 CEST 2009


On Monday 08 June 2009, Sven Langkamp wrote:
> Hi,
>
> I have commited a first version of the iterator benchmark we dicussed
> yesterday. It basically iterates over a paint device without doing memcpys.
> The results are as we expected:
>
> -HLine- and VLineIterator perform quite similar.
> -the rect iterator about 10% faster than hline
> -the random accesor is about 40% slower than hline
>
> I tried callgrind on it, but for some reason it doesn't work that good
> (maybe because of the unit test) and it's really slow. Any idea if it's
> possible to speed it up a bit?
>
>
> Sven
I runned it with callgrind, since it takes 20 minutes, you can get the file 
here [1].

I didn't do a full analysis yet, but there is something fishy, I think the 
random accessor should have the same performance as the line iterator (a 
little bit more slow since there is more checking in the accessor than 
iterator, and the cache doesn't help since it only caches four tiles (main use 
of the cache was/is for the sub random accessor). And I noticed something 
definitively wrong, the random accessor call twice as more fetchTiles as the 
h/v iterators do. Either there is something wrong in the benchmark (but 
couldn't see it) or a bug in the accessor. I will need to investigate more.

[1] http://cyrille.diwi.org/tmp/krita/callgrind.out.10663

-- 
Cyrille Berger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20090610/a86f2088/attachment.htm 


More information about the kimageshop mailing list