Experiment: Configurable Pickle protocol version#1416
Draft
moreati wants to merge 1 commit into
Draft
Conversation
Member
Author
|
SSH benchmarks were over WiFi |
Member
Author
|
Cousin of #1416, knowing python version of contexts would allow dynamically choosing best supported Pickle protocol. |
9865e9d to
9708231
Compare
Member
Author
|
Little to no speed-up of single-shot benchmark ➜ mitogen git:(mitogen.pickle_protocol) ✗ hyperfine --warmup 1 'python3.14 hello_local2.py' 'PICKLE_PROTOCOL=3 python3.14 hello_local2.py'
Benchmark 1: python3.14 hello_local2.py
Time (mean ± σ): 190.0 ms ± 1.9 ms [User: 119.3 ms, System: 20.9 ms]
Range (min … max): 187.1 ms … 194.4 ms 15 runs
Benchmark 2: PICKLE_PROTOCOL=3 python3.14 hello_local2.py
Time (mean ± σ): 188.7 ms ± 1.8 ms [User: 118.3 ms, System: 20.6 ms]
Range (min … max): 186.4 ms … 192.2 ms 15 runs
Summary
PICKLE_PROTOCOL=3 python3.14 hello_local2.py ran
1.01 ± 0.01 times faster than python3.14 hello_local2.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mitogen currentl uses Pickle protocol 2, regardless of the Python versions. This constrains performance under Python 3 (#485). Configurable Pickle protocol would improve performance when exclusively using Python 3
Protocol 2
Protocol 3