From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31708 invoked from network); 30 Nov 2021 08:26:04 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Nov 2021 08:26:04 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1638260764; b=p7BdvOIX22csTwTZ/4Pii/IC0QM9Ydk3MJHLezfw0+JChGc8R8sFo0yGCLtH/aGickGOfvJtFI 5dlzpbxT1i1hbmhRhRULk4SICl+09dIy3r8VNL8acDIji4Xungs9/ajA0fOHokusPUlgWxLzH3 WzPwNxB4MNmV2mceAff3WvvnzbH5as7xd5jRvTMCjeg2/sWWwmaiFLtmEXG1rC+xAiYMECNKIY N5zTOhE24XcXQvxMZDBhmI8mA+dFWooyUTkUt4mz9fke8Ab0dyQpguWVhrVK07uGx5r+Wc4+Qs UcDddebzpWJ0k02cDs+LnNp/jY3mfST3pKGo0MRdCF5jeg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-wm1-f46.google.com) smtp.remote-ip=209.85.128.46; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1638260764; bh=KnsmNMH5QBMqtdIKxh/mKWdyEmFiYAjrmuWJelDv1t8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=IgNMEkt9ja5xxFqbI3y1vA1LBTQVHTI1t+OasPeEuUvk09h6wnAoYsE7yhF3kWXoDFPlB3o7QW ovokxCiCJUBvXWHqahCY0zoEnqF4ebVso+V6da/hjcB30LcKEfKGue/RphZElKMf3AO8Jk2DRP PcI5ryMlh2A1XluhuvYs8lWjdIc9TAhIMdgNe8yhbhiFAl9WxjxGzfNq86N/s3WTvM5FLcue0g wk0Pfg4VgKqhUyAbNKHaMOg4y+WMZWzM3YCMWKDZKftDRXFk5jNvbh0mXCmJXhmIM+w4aCNjNK hUyooUMZwG1FOmNYT1LOzfphnHmFuZZ8rZb2EH9xEl1Kfg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=fU/cx0B11iXI0atBEKvDkEHcTaHktYghQgFAiYFW+do=; b=MTKinmLScJElgVlQRCRZbNt7nZ 8drZuW3BxqLTyP5fG6WBOZhtojEHHx7wYRFb7Z7J3TbUGUD5bECLABe/xGdOADzO+CQNsBVBqrIqI BszjUGrAV/n2AmAr+Ep8gLtB/wUBCtcblOVbR0pQl8HeZ/PQnMcRGK34hA0JD76Ppy/EciMtvK9UJ hEoN/5QbZohRydbYG8jTB1eMSLQpZdtXSIs+WwVjIPM9lr8X/6vqvxmqkobkuRZ614kZjoTN35qlM NCBj386kQOa/k0Szx8ErtDM0NOqDjzHt3bTwBLteU2wWTQF/0yOYXVjJ1stJFmgHf4egTSf4C2Fjt C42jpIJg==; Received: from authenticated user by zero.zsh.org with local id 1mrySi-000ENF-Fw; Tue, 30 Nov 2021 08:26:04 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wm1-f46.google.com) smtp.remote-ip=209.85.128.46; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-wm1-f46.google.com ([209.85.128.46]:51925) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mryRw-000De7-8t; Tue, 30 Nov 2021 08:25:16 +0000 Received: by mail-wm1-f46.google.com with SMTP id 137so16699851wma.1 for ; Tue, 30 Nov 2021 00:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fU/cx0B11iXI0atBEKvDkEHcTaHktYghQgFAiYFW+do=; b=D+JPoFHeFvz5jhRFZply5n9Q/h9SroRfoIkyA3VxG4blmDdWdyFP8ooUz3AJWDKVJK ebVcVg1/7sAv1R7o2qvsspyBP9UkAO8bKIE2slQWN3qQx76up+Qe/cyiwijUUHmSavO/ sFVKK4r+Y48tDaJ7y8My241VGnD5DVFfwwlJi6u5ECNRH3bMhdq5zSe6iXJWrTFDBObQ XPrDhtL9kcVGGBwZPv5TjX/CCO6rQJcb43eIB+IcYlyYWffw/mq9W2yZRG6nOOO3HMNy woTUDPpAD5o5eSothznJtLfeKRDe8hkxShc82a3RAztuTcG+pZ9TgY01VyZjVI+OTmMA btFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fU/cx0B11iXI0atBEKvDkEHcTaHktYghQgFAiYFW+do=; b=KHNIkkGpsKBLxSmXO3CM6NTXaeI+M44m7tw5k+VwpfeRwUBhGkM1189aNqGLdJTUtf qyEomjH+XpxIgNw+/UQK9HAKOLpctTtb7uPMuecQGkxXsKiKdOxZ714285affe0Bwi2b gGiRiFP4i9IJb8VJ/0k5KBPQwzX4aTsuLS8GK3S2Vv+cJRJPPrlWMwsm1ih2kfGd5AJ+ UNc+MxRNK6fQ0QNZSo7AF2taremufVIjERTGmMxYqMMI1lgdOprzB4s/hnZe4iSVTvNT pnQvebimKfiJK0kmm2ejYFMxGcDNY45fRpUPvHSc9iRkEB3gyAwqR96mPRF+syDDUlhH ufDw== X-Gm-Message-State: AOAM532MTaG4GGia0/hugiROsKxZSVB7bnXZmFWfDNhz3ZFXgy63weQT ivdO7lE3UA6YKkevk+b0SgZ3yzUh6+8/f82OG4Y= X-Google-Smtp-Source: ABdhPJwU8QnAM2GkIjiPHhmCaVVRXBANr/exPXrQbIR/mdpHl4p71YudmppCjaecPAUM7kqZ9LhTfGSclrgDEa3AqGE= X-Received: by 2002:a7b:ca4c:: with SMTP id m12mr3272920wml.119.1638260715870; Tue, 30 Nov 2021 00:25:15 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Zach Riggle Date: Tue, 30 Nov 2021 02:25:04 -0600 Message-ID: Subject: Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits To: Roman Perepelitsa Cc: Bart Schaefer , Zsh Users Content-Type: multipart/alternative; boundary="00000000000004deca05d1fd4ca5" X-Seq: 27397 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --00000000000004deca05d1fd4ca5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The only performance metric I care about is the number of milliseconds between pressing =E2=8C=98T 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 =E2=86=92 source b =E2=86=92 source veryslow =E2=86=92 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@gmail.com> wrote: > On Tue, Nov 30, 2021 at 3:30 AM Zach Riggle 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. > --00000000000004deca05d1fd4ca5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The only performance metric I care about is the number of = milliseconds between pressing =E2=8C=98T to open a new tab, and having a sh= ell available to accept input.=C2=A0 Sure, input gets buffered before the p= rompt shows -- but it's still what I was trying to improve.

For this metric, I think "zsh -il -c exit" is a sufficien= t=C2=A0benchmark -- I have looked at zsh/zprof, and it provides some insigh= t, but when 90% of the startup time is the "source" builtin and t= here's no additional granularity (source a =E2=86=92 source b =E2=86=92= source veryslow=C2=A0=E2=86=92 source d) so it's not quite=C2=A0useful= .

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

Zach Riggle


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

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.
--00000000000004deca05d1fd4ca5--