Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: slow startup of zsh (1x slower than bash)



> 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