[Tutor] Why does CPython cache small integers "asymmetrically"?
Cameron Simpson
cs at cskk.id.au
Thu May 27 19:43:42 EDT 2021
On 27May2021 13:37, Cameron Simpson <cs at cskk.id.au> wrote:
>The constants themselves seem to be here:
> https://github.com/python/cpython/blob/3e7ee02327db13e4337374597cdc4458ecb9e3ad/Include/internal/pycore_interp.h#L211
On reflection, these might just be the interned ints: some _precomputed_
cached ints :-) The larger range of cached int boB reports would be a
wider range implemented programmatically at runtime.
Still no deeper insights though.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Tutor
mailing list