Opened 6 years ago

#282 new enhancement

explore ways to trap SIGFPE instead of doing runtime checks

Reported by: scoder Owned by: somebody
Priority: major Milestone: wishlist
Component: Code Generation Keywords:
Cc:

Description

To achieve Python semantics, Cython has to add a number of runtime checks around arithmetic operations in order to trap division by zero errors or integer range overflows. It should be a lot faster to trap SIGFPE instead, as this would only impact the error case, not the normal case.

Open issues:

  • how to make sure we continue safely at the correct error label after catching a signal?
  • how to do this in a portable way?

A hybrid solution that uses signals if available on a platform might also work.

Change History (0)

Note: See TracTickets for help on using tickets.