Axel Dörfler wrote: > 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 :-) Tested that. Oh, well, I loose. :-) Good to know. bye, Adi.