This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients kristjan.jonsson, larry, loewis, pitrou, serhiy.storchaka, vajrasky, vstinner
Date 2014-01-28.11:35:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390908930.9.0.249308625045.issue20416@psf.upfronthosting.co.za>
In-reply-to
Content
For the record, format 3 was added through issue16475, format 4 was added through issue19219.

In msg175962, Kristjan argued that there is no reason _not_ to share int objects, e.g. across multiple code objects. Now it seems that this argument is flawed: there is a reason, namely the performance impact.

OTOH, I consider both use case (marshaling a large number of integers, and desiring to share ints across code objects) equally obscure: you shouldn't worry about marshal performance too much if you have loads of tiny int objects, and you shouldn't worry whether these ints get shared or not.

As a compromise, we could suppress the sharing for small int objects, since they are singletons, anyway. This would allow marshal to preserve/copy the object graph, while not impacting the use case that the original poster on python-dev presented.
History
Date User Action Args
2014-01-28 11:35:30loewissetrecipients: + loewis, pitrou, kristjan.jonsson, vstinner, larry, serhiy.storchaka, vajrasky
2014-01-28 11:35:30loewissetmessageid: <1390908930.9.0.249308625045.issue20416@psf.upfronthosting.co.za>
2014-01-28 11:35:30loewislinkissue20416 messages
2014-01-28 11:35:30loewiscreate