[LC++]Big objects in a class interface: good techniques?

Carlo Wood carlo at alinoe.com
Mon Mar 31 20:07:02 UTC 2003


On Mon, Mar 31, 2003 at 09:27:28AM +0200, Torsten Rennett wrote:
> assembler code :-(  Hi, Carlo, I think you know the right answer ;-)

There is little difference to begin with.
If you call a member function of Wiring, say Wiring::foo(int),
then actually the "C" function Wiring_foo(Wiring* this, int a)
will be called.  So, in all cases you will need and pass a
pointer to the Wiring object.  Optimization might occur only
later, if foo can be optimized.

> BTW, I would not even spend a second about thinking how to optimize one
> indirection! 

Agreed.

-- 
Carlo Wood <carlo at alinoe.com>



More information about the tuxCPProgramming mailing list