AndyG warns us that if you're upgrading to Visual Studio 2017, you might be incurring some unexpected performance overhead thanks to better noexcept support.
Friendly reminder to mark your move constructors noexcept
by AndyG
From the article:
Since C++11 we have had the
noexcept
keyword, which is a promise that the function will not throw an exception (and if it does, go straight tostd::terminate
, do not pass go). noexcept is nice for two reasons:
- The compiler can optimize a little better because it doesn’t need to emit any code for unwinding a call stack in case of an exception, and
- It leads to incredible performance differences at runtime for
std::vector
(and other containers, too)
Add a Comment