Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shave off another ~18ms off zsh startup time
Running `brew --prefix` is slow. Checking whether file exists with `-r` is slower than `-e`. Avoid double sourcing configuration if it's in two locations. Before: φ for i in $(seq 0 10); do time /bin/zsh -i -c exit; done /bin/zsh -i -c exit 0.05s user 0.05s system 95% cpu 0.111 total /bin/zsh -i -c exit 0.05s user 0.05s system 95% cpu 0.098 total /bin/zsh -i -c exit 0.05s user 0.05s system 94% cpu 0.097 total /bin/zsh -i -c exit 0.05s user 0.05s system 95% cpu 0.097 total /bin/zsh -i -c exit 0.05s user 0.05s system 94% cpu 0.097 total /bin/zsh -i -c exit 0.05s user 0.05s system 95% cpu 0.098 total /bin/zsh -i -c exit 0.05s user 0.05s system 95% cpu 0.097 total /bin/zsh -i -c exit 0.05s user 0.05s system 95% cpu 0.097 total /bin/zsh -i -c exit 0.05s user 0.05s system 95% cpu 0.097 total /bin/zsh -i -c exit 0.05s user 0.05s system 95% cpu 0.097 total /bin/zsh -i -c exit 0.05s user 0.05s system 95% cpu 0.098 total After: φ for i in $(seq 0 10); do time /bin/zsh -i -c exit; done /bin/zsh -i -c exit 0.04s user 0.04s system 95% cpu 0.090 total /bin/zsh -i -c exit 0.04s user 0.04s system 95% cpu 0.081 total /bin/zsh -i -c exit 0.04s user 0.04s system 95% cpu 0.081 total /bin/zsh -i -c exit 0.04s user 0.04s system 95% cpu 0.081 total /bin/zsh -i -c exit 0.04s user 0.04s system 95% cpu 0.081 total /bin/zsh -i -c exit 0.04s user 0.04s system 96% cpu 0.084 total /bin/zsh -i -c exit 0.04s user 0.04s system 95% cpu 0.081 total /bin/zsh -i -c exit 0.04s user 0.04s system 95% cpu 0.082 total /bin/zsh -i -c exit 0.04s user 0.04s system 95% cpu 0.082 total /bin/zsh -i -c exit 0.04s user 0.04s system 95% cpu 0.081 total /bin/zsh -i -c exit 0.04s user 0.04s system 95% cpu 0.082 total
- Loading branch information