icefox tests issues
Lubos Lunak
l.lunak at suse.cz
Thu Oct 21 13:26:59 CEST 2004
On Thursday 21 of October 2004 12:45, Raul Fernandes wrote:
> Forgive me about the speedup by factor 5 in konqueror. In a second look, it
> seems result from the cache.
> But the overall system improvements is real, not so impressive, but
> visible. I have removed all it++ occurrencies from kdelibs and kdebase,
> following what Aaron Seigo write in his blog: "improve whatever you can,
> even if it seems trivial right now." (http://www.planetkde.org/)
> Again, forgive about the wrong notice. Newbie mistake.
> I made a test here.
>
> QTime *time = new QTime();
> time->start();
> for( int i = 0; i< 1000; i++ )
> for( QValueListIterator<QCString> it = dic.begin(); it != dic.end(); it++
> ); int a = time->elapsed();
> time->start();
> for( int i = 0; i< 1000; i++ )
> for( QValueListIterator<QCString> it = dic.begin(); it != dic.end(); ++it
> ); int b = time->elapsed();
>
> The QValueList has 12000 entries.
> The result was a = 2098 and b = 1928
> and, with caching the result (QValueListIterator<QCString> end =
> dic.end();), a =1741 and b = 1602. So, the conclusion is ++it and caching
> the end() are faster, IMO.
That's slightly more than 20% time saved in the best case, and it is for code
only executing empty loops. Adding some useful code into the body loops would
reduce the improvement, and KDE applications also don't spend all the time
just iterating over lists. In reality the gain could possibly be even
negligibly small.
That said, I don't see any good reason against, so if you're willing to do
this tedious work and do the changes in KDE, why not?
--
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
More information about the Kde-optimize
mailing list