Use memset in even more cases - #1273
Conversation
|
I pushed a merge to |
Looks good |
Co-authored-by: Casey Carter <cartec69@gmail.com>
Stephan T. Lavavej (StephanTLavavej)
left a comment
There was a problem hiding this comment.
Thanks for implementing this optimization! I found one bug involving floating-point negative zero, but otherwise this looks very solid.
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
`static_cast<_Ty>(0)` emits this warning for object pointers, function pointers, and `nullptr_t`. We can avoid this warning by using empty braces to request zero-initialization.
|
Looks great! I've pushed three small changes (FYI Casey Carter (@CaseyCarter)) and merged with
|
|
Thanks again for this optimization, automatically making user code faster! This will ship in VS 2019 16.9 Preview 2. 🎉 |
Another small PR to optimize
(ranges::)(uninitialized_)fill(_n). I applied the optimization only to the_HAS_IF_CONSTEXPRbranch because withoutif constexprit becomes very tricky to implement and I don't know how long the!_HAS_IF_CONSTEXPRbranch will live. Part of #431.