D pointers

Lars Knoll lars at trolltech.com
Mon Oct 3 07:21:37 BST 2005


On Saturday 01 October 2005 19:16, George Staikos wrote:
> On Saturday 01 October 2005 12:56, Lubos Lunak wrote:
> > Dne so 1. října 2005 17:35 George Staikos napsal(a):
> > > On Saturday 01 October 2005 11:16, Stephan Kulow wrote:
> > > > Am Samstag, 1. Oktober 2005 17:00 schrieb Thiago Macieira:
> > > > > The optimising compiler will very likely elect this->d to be cached
> > > > > in a register, just like this itself is.
> > > >
> > > > Yeah, right. Glad we have soo many registers on i386.
> > >
> > >   I'm glad someone else pointed this out.  I was trying to get out of
> > > this conversation altogether (and I will just revert changes to my own
> > > classes that I don't like), but this is a very valid point.
> >
> >  No, it's not a very valid point. Unless somebody can find a problem with
> > my KURL benchmark (which I ran on i386), the point is as valid as about
> > 2% performance loss. And BTW exactly which of your classes are
> > performance critical?
>
>    It's not a valid point that register pressure is an issue on our most
> significant platform?


Whether you use the this pointer or the d pointer makes up for exactly the 
same register use. It's one pointer in both cases.

And i386 is going to be obsolete in 2 years anyways.

Lars




More information about the kde-core-devel mailing list