-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-41364: Reduce import overhead of uuid module #21586
Conversation
Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
(cherry picked from commit bf2f76e) Co-authored-by: Steve Dower <[email protected]>
GH-21589 is a backport of this pull request to the 3.9 branch. |
Sorry, @zooba, I could not cleanly backport this to |
(cherry picked from commit bf2f76e) Co-authored-by: Steve Dower <[email protected]>
GH-21591 is a backport of this pull request to the 3.8 branch. |
|
This follows in the footsteps of python#21586
This follows in the footsteps of python#21586 This speeds up import uuid by about 6ms on Linux. Before: ``` λ hyperfine -w 4 "./python -c 'import uuid'" Benchmark 1: ./python -c 'import uuid' Time (mean ± σ): 20.4 ms ± 0.4 ms [User: 16.7 ms, System: 3.8 ms] Range (min … max): 19.6 ms … 21.8 ms 136 runs ``` After: ``` λ hyperfine -w 4 "./python -c 'import uuid'" Benchmark 1: ./python -c 'import uuid' Time (mean ± σ): 14.5 ms ± 0.3 ms [User: 11.5 ms, System: 3.2 ms] Range (min … max): 13.9 ms … 16.0 ms 175 runs ```
This follows in the footsteps of #21586 This speeds up import uuid by about 6ms on Linux. Before: ``` λ hyperfine -w 4 "./python -c 'import uuid'" Benchmark 1: ./python -c 'import uuid' Time (mean ± σ): 20.4 ms ± 0.4 ms [User: 16.7 ms, System: 3.8 ms] Range (min … max): 19.6 ms … 21.8 ms 136 runs ``` After: ``` λ hyperfine -w 4 "./python -c 'import uuid'" Benchmark 1: ./python -c 'import uuid' Time (mean ± σ): 14.5 ms ± 0.3 ms [User: 11.5 ms, System: 3.2 ms] Range (min … max): 13.9 ms … 16.0 ms 175 runs ```
…on#115160) This follows in the footsteps of python#21586 This speeds up import uuid by about 6ms on Linux. Before: ``` λ hyperfine -w 4 "./python -c 'import uuid'" Benchmark 1: ./python -c 'import uuid' Time (mean ± σ): 20.4 ms ± 0.4 ms [User: 16.7 ms, System: 3.8 ms] Range (min … max): 19.6 ms … 21.8 ms 136 runs ``` After: ``` λ hyperfine -w 4 "./python -c 'import uuid'" Benchmark 1: ./python -c 'import uuid' Time (mean ± σ): 14.5 ms ± 0.3 ms [User: 11.5 ms, System: 3.2 ms] Range (min … max): 13.9 ms … 16.0 ms 175 runs ```
…on#115160) This follows in the footsteps of python#21586 This speeds up import uuid by about 6ms on Linux. Before: ``` λ hyperfine -w 4 "./python -c 'import uuid'" Benchmark 1: ./python -c 'import uuid' Time (mean ± σ): 20.4 ms ± 0.4 ms [User: 16.7 ms, System: 3.8 ms] Range (min … max): 19.6 ms … 21.8 ms 136 runs ``` After: ``` λ hyperfine -w 4 "./python -c 'import uuid'" Benchmark 1: ./python -c 'import uuid' Time (mean ± σ): 14.5 ms ± 0.3 ms [User: 11.5 ms, System: 3.2 ms] Range (min … max): 13.9 ms … 16.0 ms 175 runs ```
https://bugs.python.org/issue41364