| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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 ```
|
I'm not the right person to review this. You need someone who knows whether sys.platform == "linux" implies the same things as the platform module. In general, they don't, so if you want my review I would reject this change as being too risky. |
Sorry, something went wrong.
|
Thanks for the quick response! I'll wait for someone else to review. The value of sys.platform comes from Line 4296 in 1032326 Note we don't need a one-to-one correspondence here (and I'm not sure there is one, e.g. on ancient Python versions it was possible to have sys.platform == "linux2" while presumably platform.system() was still Linux). But we just need implication in one direction since we preserve the else branch. |
Sorry, something went wrong.
|
This seems correct to me; I don't see any risk to this change. |
Sorry, something went wrong.
…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 ```
| Back | FazBrowse Home | New Git URL |
This follows in the footsteps of #21586
This speeds up import uuid by about 6ms on Linux.
Before:
After: