Registered Member
|
Hello,
I'm using Eigen for some 3D geometry processing and one of the things I'm doing is constructing a transform matrix from a translation, euler rotation and scale, and I've noticed some dramatic performance differences whether I compile for 32 or 64 bit. Here's the code:
I am using MSVC2008 and Eigen 3.0.3. When compiled for 32-bit, the above code takes 3x as long as when compiled for 64-bit. I'm not sure how to go about finding out why. Also, is this the optimal way to go about generating a transform matrix from these inputs? Cheers. |
Moderator
|
One reason could be that for 32-bit you did not enabled SSE2 while they are enabled by default for 64-bit. I'm talking about the compiler options. If that changes nothing then blame MSVC.
Note that doing:
might be faster. |
Registered Member
|
I do have SSE2 enabled so I'm not sure what it could be. I'll try digging deeper to see what's up..
Thanks for the tip about the transform matrix. Using that routine cut the time to compute the transform matrix nearly in half. |
Moderator
|
It could be that MSVC has different inlining heuristics in 32 or 64 bits. The best is to check the generated assembly of your for loop and compare the 32 and 64 bit versions. In particular compare the function calls. If you find something interesting we could enforce the inlining of some functions.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]