[Mono-dev] simd: more accelerated classes

Rodrigo Kumpera kumpera at gmail.com
Tue Jan 13 15:20:15 EST 2009


For that you don't need to export the elements of Vector4f as you want to
keep
the same interface, just load the Vectors using unsafe Math.

The XNA API for vectorial math is very dead as, for example, many of the
Matrix methods
pass it by value. Matrix is a 4x4 float matrix, which means it's 64bytes big
and this fact, alone
will kill performance big time.


On Tue, Jan 13, 2009 at 6:09 PM, crashfourit <crashfourit at gmail.com> wrote:

>
> The general idea is to accelerate Microsoft.Xna.Framework math classes
> Vector4, Matrix4, Quaternion directly, since these classes are well defined
> to have direct access to member variables instead of use of properties.
>
>
>
> Rodrigo Kumpera wrote:
> >
> > It would require changing the JIT to support rewriting field operations
> if
> > they belong
> > to simd types.
> >
> > Anyway, I fail to see a compelling use case for such change. Been able to
> > pass one of it's
> > elements by reference is not one of them, as this would cripple the
> > generated code in ways that
> > would take away most of the advantages of Mono.Simd.
> >
> >
> > On Tue, Jan 13, 2009 at 4:54 PM, crashfourit <crashfourit at gmail.com>
> > wrote:
> >
> >>
> >> I was wondering what it would take to use simd to acclerate this
> >>
> >> Vector4f {
> >> public float X;
> >> public float Y;
> >> public float Z;
> >> public float W;
> >> //.......
> >> }
> >>
> >> instead of this
> >> Vector4f {
> >> internal float x;
> >> internal float y;
> >> internal float z;
> >> internal float w;
> >>
> >> public float X {get {return x;} set {x = value;}}
> >> public float Y {get {return y;} set {y = value;}}
> >> public float Z {get {return z;} set {z = value;}}
> >> public float W {get {return w;} set {w = value;}}
> >> //.......
> >> }
> >> Any sugestions?
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/simd%3A-more-accelerated-classes-tp21442105p21442105.html
> >> Sent from the Mono - Dev mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> Mono-devel-list mailing list
> >> Mono-devel-list at lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >>
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/simd%3A-more-accelerated-classes-tp21442105p21443490.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090113/36b91bdf/attachment.html 


More information about the Mono-devel-list mailing list