|
No, because when the compiler translates passing a simple type to assembly, it's just one instruction more, if the compiler doesn't optimize it (not sure if it does). As IAmHawtness said, passing classes and structs as pointers is usually faster.
To compare C++ with C#, C# passes classes as reference types by default, and simple types and structs as value types, and as you know - to modify a simple type or struct by reference, use the "ref" keyword.
|