Ticket #456 (closed enhancement: duplicate)

Opened 4 years ago

Last modified 4 years ago

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

Changed 4 years ago by scoder

  • status changed from new to closed
  • resolution set to duplicate
  • milestone changed from wishlist to Dupe/Invalid
Note: See TracTickets for help on using tickets.