I am writing a couple of wrapper classes for Intrinsics SSE - mainly for getting geometry operations using a type, but also for adding a few handy functions. All my functions and operators are built-in. Theoretically, they will all be compiled directly to the SSE assembly (without function calls), and my electrons will never leave the XMM registers.
How to pass SSE classes as arguments to provide this result?
I never change my arguments, so the choice is mainly to pass by value or pass by reference const. I assume that a good compiler optimizes both styles on the same code. But I don’t know for sure. Can anyone with more experience in the field state best practices?
Thanks in advance!
source
share