[New-bugs-announce] [issue45947] Place dict (and values) pointers at a fixed (negative) offset from the base of the object.

Mark Shannon report at bugs.python.org
Wed Dec 1 08:30:48 EST 2021


New submission from Mark Shannon <mark at hotpy.org>:

To get to the dict (or values array) of an object, we currently need 3 dependent loads.
By placing the dict at a fixed offset, this can be reduced to one.

What was `obj[obj->type->dictoffset]` becomes `obj[FIXED_OFFSET]`

See https://github.com/faster-cpython/ideas/issues/80, specifically
https://github.com/faster-cpython/ideas/issues/80#issuecomment-931504847 for more details.

----------
assignee: Mark.Shannon
components: Interpreter Core
messages: 407457
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Place dict (and values) pointers at a fixed (negative) offset from the base of the object.
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45947>
_______________________________________


More information about the New-bugs-announce mailing list