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. But (a) I don't think there's overflow checking, and (b) mypyc is very careful that tagged integers are never passed to the CPython runtime (since mypyc apps link with an unmodified CPython runtime for data types, compatibility with extensions and pure Python code). Nevertheless I think it puts your blanket claim in some perspective. -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ 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/4W3MSE7F5SUVV3AZLATZN4YOT2XZSXYH/ Code of Conduct: http://python.org/psf/codeofconduct/