[Qt-interest] A small request !

Mihail Naydenov mlists at ymail.com
Wed Sep 30 14:29:20 CEST 2009


----- Original Message ----

> From: Ian Thomson <Ian.Thomson at iongeo.com>
> To: qt-interest at trolltech.com
> Sent: Wednesday, September 30, 2009 2:40:16 PM
> Subject: Re: [Qt-interest] A small request !
> 
> Hi,
> 
> If you read the source for QPoint and so on you will see that almost 
> every function is inlined. That means there is no penalty for a function 
> call.
> 
> Are you requiring this optimization based on profiler results? It is 
> extremely strange that you are finding this to be a bottleneck.
> 
> Cheers,
> Ian.

No, no profiling, just the "the right thing" feel.

You should agree: 

setX(x() + something); 

instead of:

xp += something;

is both uglier, and (almost certainly) slower.


But as I said, it will be *nice*, not "there is a bottleneck" :)

MihailNaydenov



> Mihail Naydenov wrote:
> > So, is this (trivially) doable?
> > 
> > It will be rally nice. And this also applies to other geometric-related 
> classes like QTransform.
> > 
> > Besides the operator overloading, there is always a room for other helper 
> methods (like getScale or translateAbs in QTransform for instance) and I find it 
> a bit ugly to pay the price of function call, especially when these are 
> *geometric* classes, should be optimized more or less.
> > 
> > Thank You
> > MihailNaydenov
> > 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest



      



More information about the Qt-interest-old mailing list