From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 9eb771f9 for ; Wed, 3 Jul 2019 13:59:20 +0000 (UTC) Received: (qmail 741 invoked by alias); 3 Jul 2019 13:59:07 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24003 Received: (qmail 9301 invoked by uid 1010); 3 Jul 2019 13:59:06 -0000 X-Qmail-Scanner-Diagnostics: from aurora-borealis.phear.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25496. spamassassin: 3.4.2. Clear:RC:0(94.242.205.164):SA:0(-2.0/5.0):. Processed in 2.65968 secs); 03 Jul 2019 13:59:06 -0000 X-Envelope-From: eiro@phear.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at phear.org designates 94.242.205.164 as permitted sender) X-Virus-Scanned: amavisd-new at phear.org DKIM-Filter: OpenDKIM Filter v2.10.3 aurora-borealis.phear.org EBF71FFD6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=phear.org; s=20180217; t=1562162306; bh=dSaCKFxRgybVaucL96aTbzsIdCeeV88+SS/UPlZHvKA=; h=Date:From:To:Subject:From; b=UGrblxVgKdjEdul0afM8FQ7U+7Lwz0uwCFv6QF/i9ZofF06mXrmMaB7qNPX1PIS8L MCKno8cvZTXhemnuEIBxYNnPJDcnweS7xgG2qtDWEfCKflIBkcaduiM0fvOxqz/XU3 XsBdrG8DS5FKVEtEZ1zYxa+daHMkhYebW5I28KFzBIlG/Z7rj9Fa4ysZicBzHQbcXG 282hUUeWa9pOAM89vT+Xsv0hpgtDfNpS4qof8JZpZgGzBapnYBSvipQOlm2Bz8N8GB ekqGA2JDvZNtmb31M6WMakkZ9NB3XFVlFRBNfcMCh2De4qOUu0YAlOqE3JYt+V9GDF 6GHhRyb8hPLUA== Date: Wed, 3 Jul 2019 15:58:24 +0200 From: Marc Chantreux To: Zsh Users Subject: zsh poor performances while reading and testing ? Message-ID: <20190703135824.GA19289@prometheus.u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) hello people, i recently made a benchmark to emphasize the gain of speed people can have using filters instead of pure shell loops. however i was surprised to see how slow zsh is compared to other shells when it comes to read data. the interesting part of the benchmark is: for it (bash zsh ksh) { TIMEFMT=": $it %U %S %E" time $it -c 'while read it; do : ; done < x > /dev/null' } : bash 4,95s 1,21s 6,18s : zsh 12,65s 28,12s 40,82s : ksh 9,87s 26,52s 36,42s is there any obvious reason for that? is there a way to make it faster without diving in the C code? regards, marc