SSE - more specifically fast vector support

J Decker <[email protected]>
Newsgroups gmane.comp.gnome.mono.general
Message-ID <CAA2GJqUG2dGp2su+LpevOzR9OdKYS1W33awR7R=5O_m6_gfthg@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.