Opened 7 years ago
explore ways to trap SIGFPE instead of doing runtime checks
|Reported by:||scoder||Owned by:||somebody|
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.
- 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.