Open gitlab-importer opened 6 years ago
In Heptapod by @cfbolz on Mar 30, 2018, 09:45
It should definitely be fixed. If the depth is too deep, the traces get too long, then it aborts the trace, then it starts again. It never stops trying to create a trace (which is wrong).
In Heptapod by @cfbolz on Apr 30, 2021, 15:41
this is another bug that shows the problem of #3402!
In Heptapod by @cfbolz on Apr 30, 2023, 16:43
looking at this again, #3402 should have fixed this problem but doesn't. I wonder why the same approach doesn't work here :-(
In Heptapod by bitbucket_importer on Mar 29, 2018, 22:25
Created originally on Bitbucket by Hrvoje Nikšić
PyPy (5.10.1) is significantly slower than CPython (3.6.3) on the attached benchmark.
The script profiles traversing generators nested with
yield from
at various depths, which also comes up when suspending and resuming recursive or nestedasync
functions. I was curious whether PyPy optimizesyield from
delegation as mentioned in the original PEP and later in a message by Guido. It seems that CPython dropped the optimization due to an issue with tracebacks.It looks like PyPy doesn't implement the optimization either - but that is not the topic of this issue. I noticed a sharp slowdown in PyPy at the nesting depth of around 80. At that point the performance suddenly drops to levels significantly slower than CPython. For example, on my machine, with depth == 100:
With depth == 50, the numbers look like something I'd expect when comparing PyPy and CPython:
This is probably not a big issue in practice, but I wanted to report it in case it's an anomaly someone cares to investigate.
Attachments: benchnestedyield.py