optimize vector code

Sascha Katzner sorry.no at spam.invalid
Fri Nov 30 04:44:21 PST 2007


Bill Baxter wrote:
> Pass big structs by reference.
>      void opAddAssign(ref Vector3 v) {...

In this example this is not a good idea, because it prevents that the 
compiler inlines opAddAssign(). Don't know why, but it does.

yourSuggestion.sizeof = 0x38 + 0x23 = 0x5b bytes ;-)

LLAP,
Sascha


More information about the Digitalmars-d-learn mailing list