<cmath>: Use intrinsics where possible#1336
<cmath>: Use intrinsics where possible#1336StephanTLavavej merged 6 commits intomicrosoft:masterfrom sylveon:cmath-intrinsics
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: |
StephanTLavavej
left a comment
There was a problem hiding this comment.
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
floatandlong doubleoverloads.