Search code examples
cx86x86-64fenv

Can feenableexcept hurt a program performance?


I would like to enable floating point exceptions on some critical code using fpeenableexcept or _MM_SET_EXCEPTION_MASK (on Mac OS X).

Is there any case on x86/x86-64 where changing the enabled exceptions will hurt the program performance when no error occurs?

I am only asking about numerical code after the exception is changed and code which is not throwing any exception.


Solution

  • After some times running my application with the exception enables, I did not encounter any performance regression.