Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: slow startup of zsh (1x slower than bash)
- X-seq: zsh-users 24208
- From: Peng Yu <pengyu.ut@xxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: slow startup of zsh (1x slower than bash)
- Date: Thu, 5 Sep 2019 15:30:11 -0500
- Cc: julien.nicoulaud@xxxxxxxxx, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>, zsh-users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=arySzNv2ONov/mE2s1cVKhmiCtovBu4WFSOzOTkNqqA=; b=j4ANwW+ROXpHAT/h932H3nRt1sxozg+sIgenRVM4HHHjWhra9znC+siQ5LgrpO459l zE1XvdHpt6niP2k473g7buXMMPF5PvDaV9DEtn5dcQVuB8DS0KCzFw917UfwQEyrmQVh CVivfK0YWVU3s4k14W4oh2N/yjL3te1ep33UeI3IUMyBnobTYk+4NtnItTJ7yeqCnXkA n/79GdeDVRTegYfHLOVOb1muJOsJu0LKYjIN2IF9vUE9QyVLb5Htl29WQyDzwISd2C1A fptHFk3LLclxwmiQRRr4p3c00gNRs4vlDrv0WN/5Mr4R5impzgN9stPRoPzUBntLSQKz BBKQ==
- In-reply-to: <CAN=4vMrczC24GEH45UBaOtQY7rthiyWupmhPdJA+VgKuBnzobg@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CABrM6wk-psFFZcZW+M7OwD0ZwrMbNk4MN7e9aaJF9kBOFsVK4w@mail.gmail.com> <CAKc7PVDGmfMxkUzjmyFxJY7fNhHV16Z3xhQpNXnjEwAMf6G9hQ@mail.gmail.com> <CABrM6w=B8BP6Pk4HsW+XGDv0bpC9fYtNdr80SS6BtqegXJNcUA@mail.gmail.com> <CA+mcLN5dpscPNhpsKoA0j8tvcUh2-A7KOX7wNQYFQ7q3sdg+SA@mail.gmail.com> <CABrM6wkGd4=ikqoZOreovU95MpPe1fparZ+5qse-8fZ4M=3-OQ@mail.gmail.com> <CABrM6wk+PG2jopGJ8OqpUz-yaXqKet6aZJk2Oc7jZbjS3kWa9A@mail.gmail.com> <CAN=4vMrczC24GEH45UBaOtQY7rthiyWupmhPdJA+VgKuBnzobg@mail.gmail.com>
> You need to pass -d to zsh to make benchmarks fair.
Where is -d defined in the man page of zsh? I don't find it.
> Otherwise zsh is
> sourcing global configs while bash doesn't.
>
> time ( repeat 1000 zsh -df -c '' )
> time ( repeat 1000 bash -c '' )
>
> I get 4 ms and 3 ms for zsh and bash respectively.
>
> Note that this number has virtually no bearing on interactive shell
> startup time.
Here is my runtime result. There is still about 50% startup time
overhead of zsh compared to bash. This is quite significant.
time ( repeat 1000 zsh -df -c '' )
( repeat 1000; do; zsh -df -c ''; done; ) 3.01s user 6.07s system 75%
cpu 12.056 total
time ( repeat 1000 bash -c '' )
( repeat 1000; do; bash -c ''; done; ) 2.16s user 2.73s system 72%
cpu 6.719 total
--
Regards,
Peng
Messages sorted by:
Reverse Date,
Date,
Thread,
Author