without mono actually emitting SSE for me; I can't tell if there would
really be a difference... BUT... in the meantime

--------
Hmm... mono is faster in the operator case... where MS is faster using
an out parameter instead.... was going to make a suggestion for the
vector library but... it doesn't help always....


-----------


I do know that there is a large difference in performance between

[Acceleration (AccelMode.SSE1)]
public static Vector4f operator * (Vector4f v, float scalar)
{
    return new Vector4f (scalar * v.x, scalar * v.y, scalar * v.z,
scalar * v.w);
}

[Acceleration (AccelMode.SSE1)]
public void Mult ( float scalar, out Vector4f r )
{
/* actually this method was slower under mono; this is also fast under MS */
     r.x = scalar * x; r.y = scalar * y; r.z = scalar * z; r.w = scalar * w;
}


...
Vector4f v;

v = v * 3.0f;   /* 1000000 iterations in 17357 uS */
 v.Mult( 3.0f, out v ); /* 1000000 iterations in  10850uS */

---------
VS timings same program ( MS emits SSE for these also... )(1000000 iterations )

operator mult = 10974
out mult = 6886
del = 62.7%

---------
mono.exe program.exe timings  (1000000 iterations )

operator mult = 43062
out mult = 61723
del = 143.3%
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to