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 10759 invoked from network); 27 Oct 2021 14:41:28 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Oct 2021 14:41:28 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1635345688; b=quB3d7F43yPTu/bIUfmfBwZeM/L1DEqbn8lMvOWXPf25EQ/frjLOFNXvA2Jns0ZwW74GV78u3t iS9TalDnCnKOFTo/VqsMQ6el0e4KG/NGFU5qzKvHXoxJVCmKkhsRWSsuwmmIOJqMhu6/q0Rtjf woR7IpHB3muOsRVW8gA6qnugpzMMsMcr83T6mKa4kgRZk9YSuTjlGmqJoBLIstnX2pOmRwgx7j ohb54Gfy19g/uj/eBjohcgEu0p+6QIzK/ptQiirW6s6y9eHcduAWRbA4K7VfxjITX7KzbAi39/ v/Kj/dr+87DL9dD9G3VHghmsJNkJOVHvU8kbNP46AS+FUQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-qk1-f179.google.com) smtp.remote-ip=209.85.222.179; 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=1635345688; bh=a8w0DZhoynKmq2HCQKw9v+gWdh/i0yqpdrPGlPsUmX4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=KPtq1zm1H/BO7c3s5ZmNdZfuCm4zHLSJVNr0uKTxIqcGKO8UjCXj6f8dYWfSFakuQMwFnsgWA0 Ypi+RD2WK/bpfLLBNooOWCFyil30je2w3rS9QURbVV0v18Orp+PrdCvq71LyWdFosNLnjjVK/q 85Qi1TFPbIYagfNnXf6AsQ15GpeY5OEF4HT1aY7rnPMv2zPEU0ZcTxxyOAt42DU8lZ1MZcxjnQ RP+bLLtt0V5swQBRLaVLH1W+2zZTa4H4aZKKhW6AzhVcJ164UVPAnb06kE4Uof0JM0r6wtR5qp TFA5ES6vB1IDu5NK5in5QTVKzXPQgi00Ad9xcsBtch9yoQ==; 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:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=Zv8KF7yTHheGOwmxsLks8q6aldOZKfXnkCAr1CFBDOM=; b=bOmwe//qzjdHa0Ab1w43cEhrla RjTM32Ey097+q0Yv/s2U3VGMMCQ+RKPDaqUaJpUgIjNoSLqDraS/uEK4Ip9eBLosiO+cJn0MXuAqH bgGzA41xinqxMXe26NslJacawZGJXtvrZDvLKryZa37XTlZROo17YQtfxFvQ5l+7Hf2LfSjaD7M8x K1JS5+BdmQeuKN+rYtnw7743JysaGPk5wiMmSMljTPhP6bsYZ2OKQcG4DPEuplzQZDv7YXl9cO4nz 5f5vuZq7xNFwGpNE3vfoxS7QqudZGMKViJVgUhRyGt4c+kcXyrNIFCOQwDkx5PdoUvZI6uBuIZHIV YhUg0Lsw==; Received: from authenticated user by zero.zsh.org with local id 1mfk7L-0002eZ-3T; Wed, 27 Oct 2021 14:41:27 +0000 Authentication-Results: zsh.org; iprev=pass (mail-qk1-f179.google.com) smtp.remote-ip=209.85.222.179; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-qk1-f179.google.com ([209.85.222.179]:46907) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mfk63-0001x3-14; Wed, 27 Oct 2021 14:40:08 +0000 Received: by mail-qk1-f179.google.com with SMTP id h20so2569675qko.13 for ; Wed, 27 Oct 2021 07:40:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=Zv8KF7yTHheGOwmxsLks8q6aldOZKfXnkCAr1CFBDOM=; b=F0JshZWvngND2lTwp/1SMkinbXnOjCIINV7r719NN+y+RpJAdnfryMc2qXbqIoafpY GpxgtWhD9jOhr+28Xr+5AUGM7Oa1jnzQzOGbnknBD7htL34wK89dX3ZnaHnSg2Q6VQ9e UASEssteN5ktK4n8APUEMOW7YNyvkkKtzc+hOV6AkmPywQ+b9uCRMnfHegtLvAeqTB3R Rkpnkjk21xkYtgNlVxSYwxBNOKKiGxdSKGbW0ZuI0YRDohN42XohoS4NLUChTq/t+NsX mlZbo0FHm+FoBz6aPcmV/NMkoNHjVZxqlQxbULBut4Jz8XvsYDnOxwBihrroC1Tbpfjd AeAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Zv8KF7yTHheGOwmxsLks8q6aldOZKfXnkCAr1CFBDOM=; b=3NXNllQRPJE9n6WzmCVED39N169X1Tb6g4iF4qoETiFi7XTaiVkXA+DKPyQ5cvGddL Jeg+NJLWG6WWWP6hafyi17Rgq9Ls0cLc7232/vma7FYaNeQdGJibRwGQvcTSp6dpOU+2 zujjWNrI5ckkH6V36Y7L3KJQlNa6TqCoh8M78bzk/hWf2xxv+xO/4SfnTbcN7VcWTXu9 wq63HYVT2FHSr8w83FQR2XJktjXw60LbtjaaeqNw9KIfP2Fcr6ZfByC8onblFkuifs1n b1sNiR81yrOGYf6WuH+HESDQ1HTSr1oFsxxTDqISyxCDlV7s0qyf0Pytp8AbiIo01TBu Khzg== X-Gm-Message-State: AOAM533rGzdc09VDuLZk+AJaixrn1wswDhnN5x1A+xJ5TtMglKjVUTg4 FBpvzCUSe+PbhUTYNPslQFj0BxNVnQgzg1MFh9/QFKudpcg= X-Google-Smtp-Source: ABdhPJx3XQmZ4wwquZ9qC2XFtMdtZsXjxAYjLBziQ7ODbOIhpBID6x0LthpYOcirlCsjk+9ghtev08tWmrDObrGnP/M= X-Received: by 2002:a37:9244:: with SMTP id u65mr25141958qkd.46.1635345605358; Wed, 27 Oct 2021 07:40:05 -0700 (PDT) MIME-Version: 1.0 From: Roman Perepelitsa Date: Wed, 27 Oct 2021 16:39:53 +0200 Message-ID: Subject: zsh-bench: Benchmark for interactive zsh To: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27296 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: I made this: https://github.com/romkatv/zsh-bench Summary: - `zsh-bench` measures user-visible latency of interactive zsh: *input lag*, *command lag*, etc. You can use it to benchmark your own shell. - `human-bench` measures human perception of latency when using interactive zsh. You can use it to check how it feels to use zsh with specific latencies or to test whether you can tell a difference between 5ms and 0ms lag. - I've used `human-bench` to conduct a blind study on myself to find the maximum values of latencies that are indistinguishable from zero. For example, *command lag* below 10ms feels just like 0ms but anything above this value starts feeling sluggish. - I've used these threshold values to normalize benchmark results to see what is fast and what is slow. - Armed with this set of tools I've optimized two of my zsh projects: powerlevel10k and zsh4humans. They used to be fairly fast but now they are literally indistinguishable from instantaneous as far as human perception goes. - I've benchmarked many zsh techniques, plugins, frameworks and plugin managers and have shared my observations in the document together with a brief conclusion. This is unlikely to be of practical use to many here but hopefully will prove entertaining to a few. Roman.