お名前: xunxun
日時: 2012年5月18日 6時1分
Only considering VC 2010 compiler and 3rd libMath with -O2 -arch:SSE2/-favor:blend.
1) When only using VC2010 compiler,
these functions : atan,exp,log10,sqrt,atan2,log,sin,tan,cos,ceil,fabs
will be the most fastest using Oi+Og+fp:fast on X86 (x64 is different, with or without fp:fast is the same).
Other functions are the same with or without fp:fast.
2) When using VC2010 and Intel LibMath,
these functions :
atan,exp,log10,sqrt,atan2,log,sin,tan,cos,acos,cosh,pow,tanh,asin,fmod,sinh
will be the most fastest using #pragma function, fp:fast has no impact on them. (x64 is different, with or without #pragma function is the same)
NOTE:
fabs function must not be using #pragma function (all circumstances), or will be very slow.
And another thing, intel math lib on X86 is much more faster (20%-50%+) than VC math. But on x64, their performance is almost similar (<5%).
お名前: Tete
日時: 2012年5月18日 6時47分
Thank you for all the information.
According to your research, Intel math lib on x86 seems very faster than VC math.
お名前: xunxun
日時: 2012年5月18日 22時33分
I am interested with that atan,exp,log10,sqrt,atan2,log,sin,tan,cos,ceil,fabs have intrinsic forms only when using -O2 -fp:fast, which is more faster than without fp:fast. Other math funcitons have not the specific forms.