[ODE] Some SSE in Quick step

Joakim Eriksson jme at snowcode.com
Wed Jun 2 09:41:58 MST 2004


> > Well the reason is simple. D3D simply doesnt have 3x3 matrices. It
only
> > has 4x4 matrices.
> 
> DOH!  I was thinking Vec2/Vec3/Vec4.  However, the question doesn't
> change!
> You shouldn't have an entry at all for D3DX for m3.Identity(), or an
entry
> of "1.0(*)", with the * indicating that you had to use the unoptimized
> code.
> What did you do to get 61%?

The test was made to show the speed diffrence between the diffrent codes
so I needed to have the m3 code in there just so I could see the
diffrence if we where to go on the D3DX path. 
It might seem a bit unfair but do realise that if you where to use D3DX
then you would be forced to use 4x4 matrices everywhere even though you
could do just fine with 3x3 matrices (And there are a lot of places 3x3
matrices fits perfecly) so that is the actual speed diffrence you would
get.

The only thing that code does is to call the identity function for the
diffrent systems. Now because D3DX doesnt have a 3x3 matrix he will set
a  4x4 matrix to identity while I on the other hand only need to set a
3x3 matrix to identity. Thats where the diffrence comes from.
Thats also the reason why the m4.Idenity() takes the exact same time as
the m3.Identity & m4.Idenity() for D3DX.

Cheers
 Joakim E. - http://www.snowcode.com






More information about the ODE mailing list