some iterator benchmarks
C. Boemann
cbo at boemann.dk
Thu May 30 07:51:39 UTC 2013
Hi
I did the iterator benchmarks and tried it with varying tilesizes
The findings are that for the nConseqHPixels type iterations the speed
advantage of doubling the tilesize is a doubling of the speed
But for non nConseqHPixels the adavantage is only 2%
And for the random accessor the advantage is 25% 12% 10% (for each doubling
the gain becomes smaller)
The disadvantages of doubling the tilesize is that it quadrouples the memory
usaga every time a tile is committed to the undo buffer. Even in the best case
assumption that would be very noticable in practical usage maybe not 4 times
more but even 2 times more would be bad.
We could I guess only double the width giving us the speed but not the height
lessening the memory impact. That would give us non-square tiles but other
than possibly some undetected bugs i don't think it would be a problem.
normal (64px) tilesize
----------------------
QDEBUG : KisIteratorBenchmark::runBenchmark() HLineIterator run 0 took 307
QDEBUG : KisIteratorBenchmark::runBenchmark() qttest(6462)
KisIteratorBenchmark::hLineIter: HLineIterator with nConseqHPixels run 0 took
29
QDEBUG : KisIteratorBenchmark::runBenchmark() const HLineIterator took 272
QDEBUG : KisIteratorBenchmark::runBenchmark() HLineIteratorNG run 0 took 291
QDEBUG : KisIteratorBenchmark::runBenchmark() qttest(6462)
KisIteratorBenchmark::hLineIterNG: HLineIterator with nConseqHPixels run 0
took 29
QDEBUG : KisIteratorBenchmark::runBenchmark() const HLineIteratorNG took 272
QDEBUG : KisIteratorBenchmark::runBenchmark() VLineIterator run 0 took 292
QDEBUG : KisIteratorBenchmark::runBenchmark() const VLineIterator took 274
QDEBUG : KisIteratorBenchmark::runBenchmark() VLineIteratorNG run 0 took 292
QDEBUG : KisIteratorBenchmark::runBenchmark() const VLineIteratorNG took 284
QDEBUG : KisIteratorBenchmark::runBenchmark() RectIterator run 0 took 266
QDEBUG : KisIteratorBenchmark::runBenchmark() RandomIterator run 0 took 703
QDEBUG : KisIteratorBenchmark::runBenchmark() const RandomIterator took 704
128px tilesize
--------------
QDEBUG : KisIteratorBenchmark::runBenchmark() HLineIterator run 0 took 296
QDEBUG : KisIteratorBenchmark::runBenchmark() qttest(9424)
KisIteratorBenchmark::hLineIter: HLineIterator with nConseqHPixels run 0 took
14
QDEBUG : KisIteratorBenchmark::runBenchmark() const HLineIterator took 265
QDEBUG : KisIteratorBenchmark::runBenchmark() HLineIteratorNG run 0 took 277
QDEBUG : KisIteratorBenchmark::runBenchmark() qttest(9424)
KisIteratorBenchmark::hLineIterNG: HLineIterator with nConseqHPixels run 0
took 13
QDEBUG : KisIteratorBenchmark::runBenchmark() const HLineIteratorNG took 265
QDEBUG : KisIteratorBenchmark::runBenchmark() VLineIterator run 0 took 277
QDEBUG : KisIteratorBenchmark::runBenchmark() const VLineIterator took 265
QDEBUG : KisIteratorBenchmark::runBenchmark() VLineIteratorNG run 0 took 278
QDEBUG : KisIteratorBenchmark::runBenchmark() const VLineIteratorNG took 266
QDEBUG : KisIteratorBenchmark::runBenchmark() RectIterator run 0 took 240
QDEBUG : KisIteratorBenchmark::runBenchmark() RandomIterator run 0 took 527
QDEBUG : KisIteratorBenchmark::runBenchmark() const RandomIterator took 504
256px tilesize
--------------
QDEBUG : KisIteratorBenchmark::runBenchmark() HLineIterator run 0 took 284
QDEBUG : KisIteratorBenchmark::runBenchmark() qttest(12250)
KisIteratorBenchmark::hLineIter: HLineIterator with nConseqHPixels run 0 took
6
QDEBUG : KisIteratorBenchmark::runBenchmark() const HLineIterator took 260
QDEBUG : KisIteratorBenchmark::runBenchmark() HLineIteratorNG run 0 took 280
QDEBUG : KisIteratorBenchmark::runBenchmark() qttest(12250)
KisIteratorBenchmark::hLineIterNG: HLineIterator with nConseqHPixels run 0
took 7
QDEBUG : KisIteratorBenchmark::runBenchmark() const HLineIteratorNG took 261
QDEBUG : KisIteratorBenchmark::runBenchmark() VLineIterator run 0 took 290
QDEBUG : KisIteratorBenchmark::runBenchmark() const VLineIterator took 262
QDEBUG : KisIteratorBenchmark::runBenchmark() VLineIteratorNG run 0 took 277
QDEBUG : KisIteratorBenchmark::runBenchmark() const VLineIteratorNG took 261
QDEBUG : KisIteratorBenchmark::runBenchmark() RectIterator run 0 took 238
QDEBUG : KisIteratorBenchmark::runBenchmark() RandomIterator run 0 took 458
QDEBUG : KisIteratorBenchmark::runBenchmark() const RandomIterator took 440
512px tilesize
---------------
QDEBUG : KisIteratorBenchmark::runBenchmark() HLineIterator run 0 took 297
QDEBUG : KisIteratorBenchmark::runBenchmark() qttest(15419)
KisIteratorBenchmark::hLineIter: HLineIterator with nConseqHPixels run 0 took
4
QDEBUG : KisIteratorBenchmark::runBenchmark() const HLineIterator took 270
QDEBUG : KisIteratorBenchmark::runBenchmark() HLineIteratorNG run 0 took 279
QDEBUG : KisIteratorBenchmark::runBenchmark() qttest(15419)
KisIteratorBenchmark::hLineIterNG: HLineIterator with nConseqHPixels run 0
took 3
QDEBUG : KisIteratorBenchmark::runBenchmark() const HLineIteratorNG took 266
QDEBUG : KisIteratorBenchmark::runBenchmark() VLineIterator run 0 took 277
QDEBUG : KisIteratorBenchmark::runBenchmark() const VLineIterator took 263
QDEBUG : KisIteratorBenchmark::runBenchmark() VLineIteratorNG run 0 took 275
QDEBUG : KisIteratorBenchmark::runBenchmark() const VLineIteratorNG took 259
QDEBUG : KisIteratorBenchmark::runBenchmark() RectIterator run 0 took 238
QDEBUG : KisIteratorBenchmark::runBenchmark() RandomIterator run 0 took 425
QDEBUG : KisIteratorBenchmark::runBenchmark() const RandomIterator took 410
More information about the kimageshop
mailing list