
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2018-07-17 16:49 byserhiy.storchaka, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 8318 | merged | serhiy.storchaka,2018-07-17 16:50 | |
| Messages (2) | |||
|---|---|---|---|
| msg321841 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | 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)*![]() | 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 | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:03 | admin | set | github: 78322 |
| 2018-07-18 07:20:57 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2018-07-18 07:10:55 | serhiy.storchaka | set | messages: +msg321862 |
| 2018-07-17 16:50:30 | serhiy.storchaka | set | keywords: +patch stage: patch review pull_requests: +pull_request7853 |
| 2018-07-17 16:49:06 | serhiy.storchaka | create | |