3 ms·
> the requirement that all code be unwindable. i would not call that an improvement in all cases... the extra code produced by enabling exceptions, even for th
by jheriko 10y ago
> the requirement that all code be unwindable.
i would not call that an improvement in all cases... the extra code produced by enabling exceptions, even for the latest compilers, produces enough bloat and slow down for basically everyone seriously concerned with real-time performance to turn them off.
small simple functions are forced to have prologue/epilogue, use a frame pointer and to preserve the return address on the stack. doesn't sound like much, but if your function does anything simple (float f() { return 1; } bool g(float a, float b) { return a < b; } etc...) you spend all the time paying for exceptions instead of the intended functionality.
- quotemstr 10y agoYou're confusing unwinding mechanisms. The whole point of using unwind tables is to avoid the need to preserve frame pointers. There zero cost in pure C code and minimal cost in C++ code just for preserving the ability to unwind. You absolutely do not need to have extra prologue and epilogue code or to burn a register for a frame pointer.
- jheriko 10y agofrom what i understood it only gets rid of those requirements in some cases.... there is a table i remember in some doc about this, the only reason i listed from memory was the lack of being able to find it quickly on google .. its a shame i can't find it. perhaps my memory is imply faulty.