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 <>
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.
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: <>
2014-01-28 11:35:30loewislinkissue20416 messages
2014-01-28 11:35:30loewiscreate