From my tests, it appears that Mathias changes are good enough to where I do
not need to have the SSE optimizations. Here are some details:
8748 with Mathias opt (version 1, and SSE)
Framerates: (20.2, 23.1, 28.5)
Framerates: (17.0, 22.3, 31.2)
Framerates: (16.9, 26.8, 39.3)
8879 no SSE
Framerates: (20.8, 27.9, 33.1)
Framerates: (20.0, 27.6, 36.8)
Framerates: (23.7, 28.5, 33.9)
8879 with SSE
Framerates: (23.0, 28.6, 35.1)
Framerates: (21.3, 26.6, 35.0)
Framerates: (20.3, 26.1, 35.5)
When reviewing this data the average framerate is about the same (The
average is the middle column). We can see improvement of performance from
build 8748.
James Killian
----- Original Message -----
From: "Robert Osfield" <[EMAIL PROTECTED]>
To: "OpenSceneGraph Submissions" <[email protected]>
Sent: Wednesday, September 17, 2008 10:52 AM
Subject: Re: [osg-submissions] Platform independent
matrixmultiplicationoptimization
Hi James,
Now the Mathias changes are checked in could you do some testing at
your end to see how they affect performance, and whether they do make
the need for SSE optimizations redundant. Once we get a feel for this
then we can come back to discussing SEE optimizations.
Robert.
On Wed, Sep 3, 2008 at 2:01 PM, James Killian <[EMAIL PROTECTED]>
wrote:
I sure hope Robert will "make" time to merge this. I was about to ping
again on this subject... I'll glv (get latest version) or merge these
locally and profile to see if matrix mult is heavily used in our game. It
is not a question of if the SSE optimization would improve upon the
changes
already made here, it is more of a question of if the gain is still
significant enough to be worth the effort. With the code you previously
sent me the answer is yes it was for our game.
Thanks for this submission!
James Killian
----- Original Message ----- From: "Mathias Fröhlich"
<[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, September 03, 2008 6:51 AM
Subject: [osg-submissions] Platform independent matrix
multiplicationoptimization
Hi Robert,
I have attached a change to the matrix multiply stuff.
This is a generic optimization that does not depend on any cpu or
instruction
set.
The optimization is based on the observation that matrix matrix
multiplication
with a dense matrix 4x4 is 4^3 Operations whereas multiplication with a
transform, or scale matrix is only 4^2 operations. Which is a gain of a
*FACTOR*4* for these special cases.
The change implements these special cases, provides a unit test for these
implementation and converts uses of the expensiver dense matrix matrix
routine with the specialized versions.
Depending on the transform nodes in the scenegraph this change gives a
noticable improovement.
For example the osgforest code using the MatrixTransform is about 20%
slower
than the same codepath using the PositionAttitudeTransform instead of the
MatrixTransform with this patch applied.
If I remember right, the sse type optimizations did *not* provide a factor
4
improovement. Also these changes are totally independent of any cpu or
instruction set architecture. So I would prefer to have this current kind
of
change instead of some hand coded and cpu dependent assembly stuff. If we
need that hand tuned stuff, these can go on top of this changes which must
provide than hand optimized additional variants for the specialized
versions
to give a even better result in the end.
An other change included here is a change to rotation matrix from
quaterion
code. There is a sqrt call which couold be optimized away. Since we divide
in
effect by sqrt(length)*sqrt(length) which is just length ...
The change is based on rev 8828.
Greetings
Mathias
--
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
--------------------------------------------------------------------------------
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org