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.
-
Show this thread
-
Replying to @TimSweeneyEpic
I toyed with a new C-like language that supports the "try/catch" mechanism simply by passing in a second Return Address for the fail case so that when a failable function fails, it will return to the catch block of its caller without the need for the caller to check return value.
1 reply 1 retweet 18 likes
Replying to @keebus
I think that’s exactly what’s needed. Herb Sutter has been developing a similar proposal for C++. In the case of C++, the compiler has to generate a stub of code for all functions that runs local destructors and jumps to the parent handler.
3:20 AM - 31 Jan 2020
0 replies
0 retweets
12 likes
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.