David Mertz wrote: > On Wed, Dec 11, 2019, 6:40 AM Mark Shannon m...@hotpy.org > wrote:
> > I NEVER care about memory at all... except inasmuch as it effects speed. In my admittedly idiosyncratic experience, memory is usually by far my most constrained resource. I do care about it, even if python alone isn't using much. That said, CPython has typically thrown memory at all sorts of things, including rounding sizes up to 64-bit. It isn't worth absurd contortions to make a difference decision in only one small area. > On the other hand, if we actually have a huge number of classes, or > coroutines, or bytecodes, then maybe shaving a couple bits off the memory > representation of each one could matter. Or we could only allocate classes within a certain subset of the memory space, so that every instance saw savings even when just pointing to their classes. > But that is 100% orthogonal to the hard limit idea. That sort of per-instance savings is only available if you know you won't need to distinguish between more than N pointer destinations. It probably would take at least a working prototype to show that it would help in practice though, before there was remotely general support for enforcing limits and/or changing the binary layout. _______________________________________________ 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/GUWAXP4X5JVCS3NUHF7R6IH46A5FYVEE/ Code of Conduct: http://python.org/psf/codeofconduct/