Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue32037

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Pickle 32-bit integers with protocol 0 as INT instead of LONG
Type:enhancementStage:resolved
Components:Library (Lib)Versions:Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: alexandre.vassalotti, serhiy.storchaka
Priority:normalKeywords:patch

Created on2017-11-15 16:59 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 4407mergedserhiy.storchaka,2017-11-15 17:07
Messages (2)
msg306285 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)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)*(Python committer)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
DateUserActionArgs
2022-04-11 14:58:54adminsetgithub: 76218
2017-11-16 07:45:07serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-11-16 07:44:45serhiy.storchakasetmessages: +msg306342
2017-11-15 17:07:49serhiy.storchakasetkeywords: +patch
stage: patch review
pull_requests: +pull_request4356
2017-11-15 16:59:49serhiy.storchakacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp