Re: icefox tests issues
Raul Fernandes <[email protected]> Thu, 21 Oct 2004 10:45:40 +0000
| Newsgroups | gmane.comp.kde.devel.optimize |
|---|---|
| Message-ID | <[email protected]> |
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. Raul Fernandes [email protected]