Just eliminated C++ exceptions in a complicated multithreaded library. It’s 15% faster despite all performance sensitive functions previously being declared noexcept, with no obvious explanation.
-
-
That's wild
-
Not really, unwinding needs a predictable pattern of register and stack usage so that the unwinding can proceed without crashing so you probably have slightly different fun entry as well as register allocation. X86 was prolly worse wrt legacy while x64 has in-code structs
- 1 more reply
New conversation -
-
-
I was going to ask about reduced state saving at function calls (no chance for an exception, no reason to track lifetimes, etc.), but you say "no assembly differences"?

-
Could be something like Control Flow Guard?https://docs.microsoft.com/en-us/windows/win32/secbp/control-flow-guard …
- 2 more replies
New conversation -
-
-
Is that just on MSVC, or clang too?? I was always fed the (lie?) that modern exceptions have a 0 performance hit until you use them, but are slower in the event that you DO throw, am I just mistaken?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.