On Tue, 22 Sep 2020 17:11:40 -0700 Guido van Rossum <gu...@python.org> wrote:
> On Tue, Sep 22, 2020 at 4:58 PM Greg Ewing <greg.ew...@canterbury.ac.nz> > wrote: > > > What are you trying to achieve by using tagged pointers? > > > > It seems to me that in a dynamic environment like Python, tagged > > pointer tricks are only ever going to reduce memory usage, not > > make anything faster, and in fact can only make things slower > > if applied everywhere. > > > > Hm... mypyc (an experimental Python-to-C compiler bundled with mypy) uses > tagged pointers to encode integers up to 63 bits. I think it's done for > speed, and it's probably faster in part because it avoids slow memory > accesses. Certainly. But I suspect the statically-typed aspect of mypyc helps it avoid systematic condition checks when accessing those tagged pointers. Which is not the case in a dynamically-typed setting such as Victor's PR. (however, tagged pointers + a runtime specializer could perhaps show more benefits than the current PR) Regards Antoine. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/E365MSXHKQD6AE3L7WZ72BLR3LESXK7C/ Code of Conduct: http://python.org/psf/codeofconduct/