Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue34141

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:Speed up pickling simple non-recusive values
Type:performanceStage:resolved
Components:Library (Lib)Versions:Python 3.8
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: alexandre.vassalotti, pitrou, serhiy.storchaka
Priority:normalKeywords:patch

Created on2018-07-17 16:49 byserhiy.storchaka, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 8318mergedserhiy.storchaka,2018-07-17 16:50
Messages (2)
msg321841 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2018-07-17 16:49
The proposed PR reduces an overhead of calling Py_EnterRecursiveCall() when pickle simple non-recusive values: None, True, False, instances of int, float, bytes, str.$ ./python -m timeit -s 'data = list(range(10**7)); import pickle' -- 'pickle.dumps(data)'Unpatched:  218 msec per loopPatched:    147 msec per loop$ ./python -m timeit -s 'data = list(map(float, range(10**7))); import pickle' -- 'pickle.dumps(data)'Unpatched:  218 msec per loopPatched:    179 msec per loop$ ./python -m timeit -s 'data = list(map(str, range(10**6))); import pickle' -- 'pickle.dumps(data)'Unpatched:  212 msec per loopPatched:    201 msec per loop
msg321862 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2018-07-18 07:10
New changeset5d4cb54800966947db2e86f65fb109c5067076be by Serhiy Storchaka in branch 'master':bpo-34141: Optimized pickling simple non-recursive values. (GH-8318)https://github.com/python/cpython/commit/5d4cb54800966947db2e86f65fb109c5067076be
History
DateUserActionArgs
2022-04-11 14:59:03adminsetgithub: 78322
2018-07-18 07:20:57serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-07-18 07:10:55serhiy.storchakasetmessages: +msg321862
2018-07-17 16:50:30serhiy.storchakasetkeywords: +patch
stage: patch review
pull_requests: +pull_request7853
2018-07-17 16:49:06serhiy.storchakacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp