[Mono-dev] Mono SIMD Function Declarations and Timing

Alan McGovern alan.mcgovern at gmail.com
Fri Nov 21 04:04:09 EST 2008


> Would you care to do the same tests on Mono and .Net using "class" instead
> of "struct" to see what happens? It would be interesting to look at. Also,
> include object creation in that as well. Thanks.

There's nothing new here. Passing a struct which is larger than the
size of a pointer by value will always be slower than passing a class.
Passing a Vector4d by value, which is 8 times larger than a pointer on
a 32bit system, is going to be slower than passing it by ref. There's
nothing that can be done about that other than using a different
overload for adding.

static void Vector4d Add (ref Vector4d first, ref Vector4d second, out
Vector4d result)


More information about the Mono-devel-list mailing list