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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32368 invoked from network); 30 Nov 2021 08:31:36 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Nov 2021 08:31:36 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1638261096; b=bW/X9sFM/Z3QnIosGAZE4+rBf2ISgunvL2ZwAOoEwwHAFnLVq8BXVQRAMCfKdJM0rJbyVwDoVL ytA6zAQFihbofbZfX6RB+9fterlHBu680P7J2INrSa/v8ljP5THm9Ce4YqESqq/2BoHhEexCSc dENt3kMGELzAI9wvk1rwhTQI+f4jyp5TnygwUCk6RtlVkJov3nUTuP4RS788JtfqWiiQQoYYWA r+/tXluhueKknyd41KmQJLb/PxlPjk8DAQVZw6oRLvVN1+ccQtZc3rmQMpXfuHmBho0axmSBbe 8ps4e0vxD5NGCc+39sjdSqa+l/YtN+tbxXFTdAf0ymTVnQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-qt1-f181.google.com) smtp.remote-ip=209.85.160.181; 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=1638261096; bh=6E6G9oEkP/rkW++Em3RDBXO61Ypfq4AJzwprggH7KVk=; 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=hGYVjv6ZIOFRfe+wohvBO2lTP5sf1Gu7RZAIypG5GssEe5LXhGAhlnyYhmE+wNduzJULLu8IBB HVBckLe4d/LLUjGOHoNs/GdpyxGe9/FqMqCG0kbFcCLFA5ERSWppYJn3Bnuas9hF8/x+J2pqRg UrjepyZvO70VVClFzXlyOV2XQ2yzo6iBzxUFqaiFGjjDM5cYHKG1HdWkHI8Ln7vL+yN39IrkvH dWXBrBnWJbP3r5Gng/88+OrQLXzjpMpYa8fgrP/XxKcsG5PhUZpQUDikcTdUr3S5zY9j6m+6wq w3SaGjFh6N5QRiNaRjTxidCxkh0werz3/a1F2yG24XsMMw==; 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=6E6G9oEkP/rkW++Em3RDBXO61Ypfq4AJzwprggH7KVk=; b=DwqgSWzNLFkf9ySyTUSO/sKm1o Rc0wMFi2BieDmxvEpLH8w/mh5FdSprf3QtbYRnRb2Sl29cL9wuysGXjI3MXfyCOd8lF30OXOhKJ9V xCbrS+7aRUg+Cs2oEzOBxb1WtF4Dbx6XtTCMtNubPP4YhD+Z4sTXgzV8vNDY9GsRQD3bvMUnnBxMk ucXHTSKMgaAC/WNE4UFmo+DgaD5Mb/2ebDme6wD/MWcXJFEIdRj2xULYTBsmPDKhVjkZB2HvliwPf segZeu5W9Qu9pPbm03Z4q3fNZsR2Oux1HYsma83JGjKOQF1Uzq+RpA8yhD/JHQR9gT0LksLoLi4zP rLx6mt5Q==; Received: from authenticated user by zero.zsh.org with local id 1mryY4-000Goe-Bz; Tue, 30 Nov 2021 08:31:36 +0000 Authentication-Results: zsh.org; iprev=pass (mail-qt1-f181.google.com) smtp.remote-ip=209.85.160.181; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-qt1-f181.google.com ([209.85.160.181]:38616) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mryVv-000Fq0-Ov; Tue, 30 Nov 2021 08:29:24 +0000 Received: by mail-qt1-f181.google.com with SMTP id 8so19437122qtx.5 for ; Tue, 30 Nov 2021 00:29:23 -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=6E6G9oEkP/rkW++Em3RDBXO61Ypfq4AJzwprggH7KVk=; b=SQi93eEp6YWjOc48aY2sJRIJZcU0bodqlM+42C9yugqKYfenqiekhIEXugO4q3N9/d FH3QXYmmo333uxv1CZBEp6y8rzqVa0XnYZJbDbHiMfetCWAQrIFKzIuQH6c2AjFIpZwD 2WJjDGamT3uovjko9x4o9s7E91+0vh9lAUIQOiuHUDQlZyYqRGo+uv8RnZFzOPagkjRa nAPmQHkYg3w+aYWQHi5HWqRleWe/qZAutRUQQREXAPN0P7Qr79lPUSuzv0s3cENE2yq4 79y3obC7YFWTr/lynyERo2mL3TN8WEZABgUuwoAtwJYUawReoHrOwaQDWrtR2cOi5lU7 1tJQ== 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=6E6G9oEkP/rkW++Em3RDBXO61Ypfq4AJzwprggH7KVk=; b=Yrp9qkL5wfCglZ0K8x1S1dKPdAZwvfluzzvxCLhKjhhO6elv0/aA/Mik3XJzxt8Oxl vR4iv8Vro0kKHidJQ5NUd+khBneCHNlgmhtEPcOq13I/SaSBhOvQdVoWHC9+sY5yx2kv nm6uedWe+nLEeU42eTh9EVm8es/SI39bgpBdImJx3MdawLc1keWUM5f/8evQ9bJDJzm2 XQHqpU3l311zCv7O5WU0s29VYWSgOVbhucCCvmuhf5FZWMl3G7/jF4gNwylF07SMn62B IAyUgLv/t+tZe2bvUNo5BS4JlZVPzutjeap+xKeKZXbQuQ+poPOgq1zm1uD3WPhM5R8/ gFbA== X-Gm-Message-State: AOAM533VONhb9LIFppjattFgQQD+cXCwZ8SgJCWIUMRG5iq4oYuI/n5d 8etUmCRuWsklqAbcIvr8NYH8Wv3SI9KIaBpg79g= X-Google-Smtp-Source: ABdhPJzBDgxpNxLKHYTi73Vdj90A0xpTf3dK3IbCypgeRPLy0duMwDXdJyAZXUmxhLNV+yKC5R1+/aBsu2QX6OwNsWk= X-Received: by 2002:ac8:544a:: with SMTP id d10mr40509648qtq.675.1638260962596; Tue, 30 Nov 2021 00:29:22 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Tue, 30 Nov 2021 09:29:11 +0100 Message-ID: Subject: Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits To: Mikael Magnusson Cc: Zach Riggle , Bart Schaefer , Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27399 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: On Tue, Nov 30, 2021 at 9:10 AM Mikael Magnusson wrote: > > On 11/30/21, Roman Perepelitsa 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. > > I think it's fine to do this (assuming he actually meant -i -l -c > "exit 0" (missing -c in the quoted command)), if you don't do any > weird stuff in your startup files Indeed, if all of the following conditions are met, the timing of `zsh -lic exit` is close to zsh startup time: - No prompt_subst. - No precmd hooks. - No zle hooks. - No exit hooks. - No HISTFILE. - No .zlogout. - No conditioning on ZSH_EXECUTION_STRING. I don't know if these things are weird but rc files using at least one of them are common. > > Since you care about interactive zsh performance, at least skim > > through the homepage of zsh-bench. It'll save you time. > > % ./zsh-bench > ==> benchmarking login shell of mikaelh ... > zsh-bench: cannot find prompt; make sure it contains hostname or the > last part of the current directory > > Sadly no time was saved :(. That's an unorthodox reading of "skim through the homepage". Roman.