So, my ray-tracer takes a very large amount of time (28%!) doing pow calculations. Despite this, I have been unable to find anything faster. I have tested:
http://bytes.com/topic/c/answers/761659-fast-power-function
http://martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java-and-c-c/
http://www.dctsystems.co.uk/Software/power.html
And none of them give any speedup, even for the quality hits they incur. I'm using Visual Studio with full optimizations. I am now attempting to use the SSE pow functions here. However, I am running into a problem:
Error: variable "__m128" is not a type name.
. . . and, when attempting to compile:error C2146: syntax error : missing ';' before identifier '__m128'
I've looked all over for how to fix this, but I can't solve it. I have tried:[source lang="cpp"]#include <xmmintrin.h>[/source]. . . xor:[source lang="cpp"]#include <emmintrin.h>[/source]. . . but to no avail.CPU is Intel Core 2 Duo T8300 (2.4GHz, dual core)
Thanks,
G