|
|
|
|
|
by dhess
5707 days ago
|
|
> Exceptions don't just add an overhead when they're thrown, they add overhead for every function call. How else would the exception-handling runtime know to unwind the stack to the correct addresses? With unwind descriptors/exception handling tables, which can be stored in a read-only segment of the executable and don't need to be paged in until an exception occurs. They have no runtime performance cost until an exception is thrown. Unwind tables are the default exception model on most modern gcc C++ targets. They're also the default exception model in Visual C++ x64, at least. c.f.: http://stackoverflow.com/questions/318383/exception-handling... http://msdn.microsoft.com/en-us/library/1eyas8tf(VS.80).aspx |
|