Ticket #456 (closed enhancement: duplicate)
Reduce overhead on Python-free 'finally' blocks
|Reported by:||scoder||Owned by:||somebody|
It is quite common to do some pure C-level cleanup in finally blocks, such as freeing memory or resetting flags. As this cannot raise any exceptions, it would be nice to reduce the overhead of the try-finally implementation for this case by removing the exception safe/restore code from the finally block.
The generated code could be as simple as a 'computed goto' to either the exception handling or normal continuation label after running the code in the finally block.