[Python-Dev] PEP 479 and asyncio

Nick Coghlan ncoghlan at gmail.com
Sat Nov 29 18:07:15 CET 2014


On 30 November 2014 at 02:45, Olemis Lang <olemis at gmail.com> wrote:
> On 11/28/14, Guido van Rossum <guido at python.org> wrote:
> [...]
>>
>> @Olemis: You never showed examples of how your code would be used, so it's
>> hard to understand what you're trying to do and how PEP 479 affects you.
>>
>
> The intention is not to restart the debate . PEP is approved , it's
> done ... but ...
>
> <comment>
> as a side-effect beware of the consequences that it is a fact that
> performance will be degraded (under certain circumstances) due to
> either a chain of (SI = StopIteration)
>
> raise SI => except SI: return => raise SI => ...
>
> ... or a few other similar cases which I will not describe for the
> sake of not repeating myself and being brief .
> </comment>

Guido wrote a specific micro-benchmark for that case in one of the
other threads. On his particular system, the overhead was around 150
ns per link in the chain at the point the data processing pipeline was
shut down. In most scenarios where a data processing pipeline is worth
setting up in the first place, the per-item handling costs (which
won't change) are likely to overwhelm the shutdown costs (which will
get marginally slower).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list