[haiku-appserver] Re: private development

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Fri, 25 Mar 2005 20:24:16 +0100 CET

Adi Oanca <adioanca@xxxxxxxxxxxxx> wrote:
> > inline const SomeClass* GetInstance() const { return fInstance; }
> > 
> > and accessing the member directly. (I hope you didn't read over the 
> > "read access" bit.) And just while I was working today on 
> > CursorHandler, I was able to remove all such friend stuff *without* 
> > any 
> > speed change.
>       Sure, I won't argue with that. But think at the case where you call 
> X::GetInstance() from Y thousands of times. I'm ready to bet the 
> penalty 
> on performance is more than 100%.

I would doubt that even with -O0. Compilers really aren't that stupid 
nowadays :-)

Bye,
   Axel.


Other related posts: