[New-bugs-announce] [issue46097] Split function versions into 1-0xffff and 0x1000+ regions

Mark Shannon report at bugs.python.org
Thu Dec 16 06:06:10 EST 2021


New submission from Mark Shannon <mark at 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 <report at bugs.python.org>
<https://bugs.python.org/issue46097>
_______________________________________


More information about the New-bugs-announce mailing list