[Python-ideas] Membership of infinite iterators
Antoine Pitrou
solipsis at pitrou.net
Thu Nov 2 07:41:58 EDT 2017
On Thu, 2 Nov 2017 13:27:17 +0200
Koos Zevenhoven <k7hoven at gmail.com> wrote:
> There's a limit to how cheap the call to PyErr_CheckSignals() can be. As I
> mentioned earlier, even just the fact that it's a C function call can be
> too much.
>
> That's why, in the above, I used a new name PyErr_PROBE_SIGNALS() instead
> of optimizing the existing PyErr_CheckSignals() –– turning
> PyErr_CheckSignals() into a static inline function would change the ABI. I
> also didn't call it PyErr_CHECK_SIGNALS() because the functionality is not
> strictly equivalent to the existing function.
Please. If you want to replace PyErr_CheckSignals() with something
faster, the first thing to do is to prove that PyErr_CheckSignals()
*is* too expensive.
Regards
Antoine.
More information about the Python-ideas
mailing list