   XNA Math problem
  Hy everyone!In the past few weeks I was working a ray-caster renderer software. I want to upgrade it to a ray-tracer during the summer. It uses OCTREE for accelerating the rendering, multiprocessor support, and my own vector class for math with some ASM (only where it really speeds up things - I've tested it!). The vector class I use in this version has 4 double components. Everything is OK with it and it is quite fast I think. But... I decided to create a version using the XNAmath library. (Yes, I know it stores the values in single precision, not ideal for a ray-tracer renderer.) I have completely rewritten the whole thing. The algorithms, method calls and functions are exactly the same. A few things I used: FXMVECTOR for the first 3 parameters, CXMVECTOR for others, avoid operators in most of the cases, no direct access to vector components (only XMVector[Get/Set][X/Y/Z/W]()...), every small and non-recursive functions are in-lined. Test scene rendering results:My double precision vector math lib.: 2.5 secXNAMath with _XM_NO_INTRINSICS_: 3.0 secXNAMath with _XM_SSE_INTRINSICS_: 4.1 secSystem: Tri-Core Phenom, Win7X64, VCExpress2010 (Prof: same results)Project Prop: SSE2 enabled, FPModel: fast, O2 optim.Any idea why is the double version the fastest?   