News for hackers. Stuff that matters.
Re:Rust is more than safety by cesarb on Wednesday December 28, 2016 @04:50PM (#13273985)
> Every C++ functional call that can throw adds several instructions of overhead to save information about the call stack and check the return value

That's not how it works (unless you're using 32-bit Windows). I wrote a long explanation using an old gcc on Linux at https://stackoverflow.com/questions/307610/how-do-exceptions...

Basically, calling a function that can throw doesn't save any information (other than what it already has to save to do the call), and it doesn't check any return value (other than any check on the return value you wrote yourself). Instead, the exception machinery uses compiler-generated tables, keyed to the return address, to direct the execution flow to the correct landing pad.

There are no comments on this comment yet.