| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
|
Go ahead and remove the import string as described. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I use lazy import for inspect module (called 1 time).
And I suggest getting rid of import string. This will improve import time as much as possible (benchmarks without string module separately in second comment).
CPython configure flags:
Benchmarks:
Running: pipx install tuna && ./python -X importtime -c 'import cmd' 2> import.log && tuna import.log
Total import time: 0.023s -> 0.013s = x1.77 as fast
cmd import time: 0.016s -> 0.007s = x2.29 as fast
hyperfine: 23.7ms -> 15.0ms = x1.58 as fast
Main branch:
PR branch: