Enable fast floating point model and fast debug linking#11466
Conversation
|
I believe we should ship this with 1.12 so dE doesn't regress launch perf as significantly 😄 (how much speed are we losing, would you say, on startup right now?) |
|
@msftbot merge this in 5 minutes |
|
Hello @DHowett! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
|
curious if this has any effect on directional movement if you have a bunch of panes open. It should be fine since I'm checking for an epsilon of 1e-4, but who knows how bad accuracy could get. |
|
The precise model isn't actually really that much more precise than the fast one... |
|
build's failing, curiously! |
|
The tests work on my AMD CPU. The CI servers are clearly running on Intel CPUs. heh. 😎 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@msftbot merge this in 5 minutes |
|
Hello @lhecker! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
| } | ||
|
|
||
| const auto nDiff = static_cast<std::make_signed_t<U>>(*reinterpret_cast<U*>(&a) - *reinterpret_cast<U*>(&b)); | ||
| const auto uDiff = static_cast<U>(nDiff < 0 ? -nDiff : nDiff); |
There was a problem hiding this comment.
No this is 100% undefined behavior. But it works because MSVC doesn't do strict aliasing. In C++20 you can use std::bit_cast.
There was a problem hiding this comment.
Regarding the question about legality of reading floats like that: Yeah that's legal, because the bit patterns of IEEE floats are clearly defined.
There was a problem hiding this comment.
I've added til::bit_cast and replaced the reinterpret_cast hack.
| #ifdef __cpp_lib_bit_cast | ||
| #warning "Replace til::bit_cast and __builtin_bit_cast with std::bit_cast" | ||
| #endif | ||
| return __builtin_bit_cast(To, _Val); |
|
@lhecker the build is still failing, fyi. 😄 |
This commit enables /fp:fast. This doubles the performance of the Delta E computation in #11095 for instance. Additionally it re-enables two options for debug builds which are normally enabled by default by Visual Studio. ## PR Checklist * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * No change in binary size * No obvious change in behavior


This commit enables /fp:fast. This doubles the performance of the Delta E
computation in #11095 for instance. Additionally it re-enables two options for
debug builds which are normally enabled by default by Visual Studio.
PR Checklist
Validation Steps Performed