-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
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
<cmath>: Use intrinsics where possible #1336
Conversation
Partial fix for #1234
Starting since this PR it is better to use |
Right, but only for Can bring the same to I'll look into doing that. Doing the same for the int overloads might be trickier because of the macro machinery to generate them. |
Can't do that because any solution would break overload resolution for consumers with I can still do something about the integer overloads however. |
By the way from C standard: paragraph 7.1.4:
and below they ever wrote example: https://imgur.com/a/kqzW2dk So UCRT team also can do:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this optimization - I will explore/validate changes for Clang and hopefully push something soon.
@CaseyCarter FYI, I pushed a |
@CaseyCarter |
Thanks again for this codegen improvement! 😺 |
Partial fix for #1234. This uses intrinsics where possible to enhance codegen. Due to the STL relying on the UCRT for all functions here, this is the best we can do. These changes only affect users of the
float
andlong double
overloads.