Ticket #456 (closed enhancement: duplicate)
Reduce overhead on Python-free 'finally' blocks
| Reported by: | scoder | Owned by: | somebody |
|---|---|---|---|
| Priority: | major | Milestone: | Dupe/Invalid |
| Component: | Optimization | Keywords: | |
| Cc: |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.
