Message306285
| Author |
serhiy.storchaka |
| Recipients |
alexandre.vassalotti, serhiy.storchaka |
| Date |
2017-11-15.16:59:49 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1510765189.73.0.213398074469.issue32037@psf.upfronthosting.co.za> |
| In-reply-to |
|
| Content |
In Python 3 different opcodes are used for pickling integers with protocol 1 and higher. But pickling with protocol 0 always uses the LONG opcode. In Python all such integers are unpickled to the long instances.
Proposed PR makes integers that fit in a signed 32-bit integer be pickled with the INT opcode. This will decrease the size of a pickle (minus one byte 'L' per integer), speeds up pickling and unpickling, and makes these integers be unpickled to int instances in Python 2, that will save a memory. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017-11-15 16:59:49 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, alexandre.vassalotti |
| 2017-11-15 16:59:49 | serhiy.storchaka | set | messageid: <1510765189.73.0.213398074469.issue32037@psf.upfronthosting.co.za> |
| 2017-11-15 16:59:49 | serhiy.storchaka | link | issue32037 messages |
| 2017-11-15 16:59:49 | serhiy.storchaka | create | |
|