We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fmin and fmax result in a function call on GCC and MSVC (or extra instructions on Clang).
fmin
fmax
Whereas, std::min and std::max map to single XMM instruction. I haven't bench-marked it, but it should definitely give performance boost.
std::min
std::max
Proof: https://godbolt.org/z/1jbPqbvGx
The text was updated successfully, but these errors were encountered:
NB: On Windows, you will need to define NOMINMAX somewhere at the top (or in the CMake file).
Sorry, something went wrong.
I'll just note that this is one of those things that are affected by -ffast-math.
-ffast-math
Specifically -ffinite-math-only seems to eliminate the call for GCC and clang at least.
-ffinite-math-only
No branches or pull requests
fmin
andfmax
result in a function call on GCC and MSVC (or extra instructions on Clang).Whereas,
std::min
andstd::max
map to single XMM instruction. I haven't bench-marked it, but it should definitely give performance boost.Proof: https://godbolt.org/z/1jbPqbvGx
The text was updated successfully, but these errors were encountered: