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

Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits



The only performance metric I care about is the number of milliseconds between pressing ⌘T to open a new tab, and having a shell available to accept input.  Sure, input gets buffered before the prompt shows -- but it's still what I was trying to improve.

For this metric, I think "zsh -il -c exit" is a sufficient benchmark -- I have looked at zsh/zprof, and it provides some insight, but when 90% of the startup time is the "source" builtin and there's no additional granularity (source a → source b → source veryslow → source d) so it's not quite useful.

I looked at zsh-bench when it hit HackerNews (I think?) and its feature set does not appeal to me.  I don't care whether oh-my-zsh or prezto are faster, or which prompt can be the faciest 18-segment display and still have no input lag.  As its benchmarks show, prezto is usually high on the "first prompt lag" and very low on "input lag".  The former is what I was testing for.

Zach Riggle



On Tue, Nov 30, 2021 at 1:51 AM Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> wrote:
On Tue, Nov 30, 2021 at 3:30 AM Zach Riggle <zachriggle@xxxxxxxxx> wrote:
>
> The benchmark I used
>
> $ hyperfine 'zsh -i -l "exit 0"'
>
>
> Obviously this is not the BEST benchmark [for checking shell startup time]

Obviously. It's the worst or at least a strong contender for the title.

Since you care about interactive zsh performance, at least skim
through the homepage of zsh-bench. It'll save you time.

Roman.


Messages sorted by: Reverse Date, Date, Thread, Author