Hi Michael,

Michael Nikelsky wrote:
> Did you look at the generated assembly code? Because the trouble with 
> templates is: The functions quite often don´t get inlined (at least not 
> with MSVC8) which really slows you down a lot.
> Especially using templates in basic math classes like Vec3f/Pnt3f and so 
> on is probably the worst thing one can do since some functions in OpenSG 
> (like operator+ for Pnt3f) don´t get inlined. Not to mention: you loose 
> some chances for optimizations (SIMD for example could be pretty 
> difficult to use in templates when you want to use the same code for 
> Vec2f/Vec3f/Vec4f).
> 
> I finally got used to use my own math classes and do a simple 
> reinterpret cast on values stored in multifields - got me quite some 
> speedup since the compiler does correct inlining.

Do you have some benchmark results you can share? If there is a significant 
impact we need to change things...

SIMD: you're probably right on that one. Allen: did you ever get around to 
doing 
SIMD in GMTL? I.e. if we switch to GMTL, will we get SIMD for free?

        Dirk

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to