
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2017-11-15 16:59 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 4407 | merged | serhiy.storchaka,2017-11-15 17:07 | |
| Messages (2) | |||
|---|---|---|---|
| msg306285 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2017-11-15 16:59 | |
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. | |||
| msg306342 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2017-11-16 07:44 | |
New changeset3daaafb700df45716bb55f3a293f88773baf3463 by Serhiy Storchaka in branch 'master':bpo-32037: Use the INT opcode for 32-bit integers in protocol 0 pickles. (#4407)https://github.com/python/cpython/commit/3daaafb700df45716bb55f3a293f88773baf3463 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:54 | admin | set | github: 76218 |
| 2017-11-16 07:45:07 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2017-11-16 07:44:45 | serhiy.storchaka | set | messages: +msg306342 |
| 2017-11-15 17:07:49 | serhiy.storchaka | set | keywords: +patch stage: patch review pull_requests: +pull_request4356 |
| 2017-11-15 16:59:49 | serhiy.storchaka | create | |