optimizing & api-doc

Michael Olbrich kde-optimize@mail.kde.org
Thu, 16 Jan 2003 20:40:13 +0100


On Thu, Jan 16, 2003 at 03:48:55PM +0100, Lubos Lunak wrote:
>  This list is for whatever is related to improving KDE performance. If people 
> find the linker problems important, why not discussing it here?

I didn't say they shouldn't talk about this at all, but right now most
of the discussion isn't about kde but linkers and kernel. 

> If you think 
> what you proposed is important, feel free to start working on it.

I'd like to, but right now my knowledge in this area is quite limited.
That's why I asked for it in the first place. It happened several times
that a wondered about the speed of a method or class. I can't remember
exactly, but next time I'll ask here. Perhaps I can come up with a patch
for the documentation afterwards.

>  BTW, I personally think comparing performance of QString::find() varians 
> won't give many benefits. I'd expect the more powerful (regexp) one to be the 
> slowest, the least powerful (q/char) to be the fastest, and people using the 
> best fitting for their purpose.

The question is, how big is the difference in speed? Does it make sense
to split up a simple regexp and use string variant instead? 

btw this is just an example. There are a lot other situations where you
even don't know was's actually happening. And I think the one using a
library shouldn't need to know it to write fast code.

> If you want to analyze such incorrect uses of 
> API, I'd rather suggest analyzing usage patterns that just simple functions. 

Well I can't, as long as I'm the one using them incorrectly.

> I'd bet that e.g. finding out that mixing QImage and QPixmap makes code slow 
> can lead to much more noticeable improvements that comparing QString::find().

Bad example. Thats the only part of the qt documentation I can remember where 
there actually is something about speed.

Michael