New submission from Mark Shannon <m...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue45947> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com