Skip to content

Commit ccfaae4

Browse files
committed
Auto merge of #111562 - clubby789:speedup-bootstrap-py, r=jyn514
Improve startup time of bootstrap ~~If the user has a `build/host` symlink set up, we can determine the target triple by reading it rather than invoking rustc. This significantly reduces startup time of bootstrap once any kind of build has been done~~ New approach explained below ``` ➜ hyperfine -p 'git checkout -q master' -N './x.py -h' -r 50 Benchmark 1: ./x.py -h Time (mean ± σ): 140.7 ms ± 2.6 ms [User: 99.9 ms, System: 39.3 ms] Range (min … max): 136.8 ms … 149.6 ms 50 runs ➜ rust git:(master) hyperfine -p 'git checkout -q speedup-bootstrap-py' -N './x.py -h' -r 50 Benchmark 1: ./x.py -h Time (mean ± σ): 95.2 ms ± 1.5 ms [User: 67.7 ms, System: 26.7 ms] Range (min … max): 92.9 ms … 99.6 ms 50 runs ``` Also a small microoptimisation in using string splitting rather than regex when reading toml, which saves a few more milliseconds (2-5 testing locally), but less important. Profiling shows the remaining runtime is around half setting up the Python runtime, and the vast majority of the remaining time is spent in subprocess building and running bootstrap itself, so probably can't be improved much further.
2 parents fbf9698 + 5d4ce72 commit ccfaae4

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)