New submission from Mark Shannon <m...@hotpy.org>:
Because functions are mutable, specifically because the __code__ attribute is mutable, we need to version functions when specializing. However, some specializations (for special methods mainly) only have space for 16 bit versions. It is likely that programs will have more than 2**16 functions versions, but it is much less likely that they will have more than 2**16 versions of special methods. We should partition the version space into 1-0xffff for use by special methods and 0x1000+ for use by other methods. See https://github.com/python/cpython/pull/30129 for an example of why this is needed. ---------- components: Interpreter Core messages: 408686 nosy: Mark.Shannon, brandtbucher priority: normal severity: normal status: open title: Split function versions into 1-0xffff and 0x1000+ regions type: performance versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46097> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com