Message209534
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:30 | loewis | set | recipients:
+ loewis, pitrou, kristjan.jonsson, vstinner, larry, serhiy.storchaka, vajrasky |
2014-01-28 11:35:30 | loewis | set | messageid: <1390908930.9.0.249308625045.issue20416@psf.upfronthosting.co.za> |
2014-01-28 11:35:30 | loewis | link | issue20416 messages |
2014-01-28 11:35:30 | loewis | create | |
|