Brandt Bucher <brandtbuc...@gmail.com> added the comment:

> What I *think* is happening is that the inline cache takes the size of the 
> function (in code units) from about 4800 to about 5200, crossing our 
> threshold for quickening (currently set to 5000).

Yep, nailed it:

>>> len(list(dis.get_instructions(do_unpacking)))
4827
>>> len(list(dis.get_instructions(do_unpacking, show_caches=True)))
5251
>>> do_unpacking(1_000, range(10))
0.06478393300494645
>>> do_unpacking.__code__._co_quickened is None
True

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46841>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to