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,FREEMAIL_FROM,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 43a0992d for ; Fri, 5 Jul 2019 13:45:53 +0000 (UTC) Received: (qmail 1606 invoked by alias); 5 Jul 2019 13:45:31 -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: 24011 Received: (qmail 8008 invoked by uid 1010); 5 Jul 2019 13:45:31 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f52.google.com 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(209.85.166.52):SA:0(-2.0/5.0):. Processed in 1.110645 secs); 05 Jul 2019 13:45:31 -0000 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.52 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=E5rz8TTcw1RW8KmgMG+p1hVFkEo8rYCmZiXnNhqzdBM=; b=Mr/vmJ//wBFgKxKEXceG5Tztr4PplWpIBPGdLgn7322/ORs7UCU5jCaBJ8vzEdNzDQ nU43fy9X8cX71bqGohOerxOys7bypgtY9sUr1RYMDlSQy5lbq3wGuC3NyOK2ytbTD/Vr 6/VA2ir/jxP3NQ2cGNi7l1L7ffPpTMnVV9bPqHoB45fDCaR/7uvLHkM7KVo0c6T56bUZ Dwp/TlydlDvk8jwYcsQd53wqyRK5+d1hj3XmD4w4kE6T6WTNe5oTR2bCmLtS1aawlcVD qXwGWGTKpJsCw0GGiVw2sbt65khAxlsj9WWH/cw0fS3DMTtqUlqyONwTNFoM6FsjSkV6 Ag9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=E5rz8TTcw1RW8KmgMG+p1hVFkEo8rYCmZiXnNhqzdBM=; b=ZBj0+HyYOA5uzYpg35SRRtJDEWeaK841seuCs3EptuD1gdUhhmHqewrls9nMBHr1EQ gkLn1P865LVmSFmsy4eOu81jbEKXVVWvu6yhlKUHdQLukLJ/OjvfE6qUa8pO5mpDW2ni ZoDRWmAwA9A+DEQ66pi1Jah1A7n4dUBE2qegCuhp7XfRvQwUF0qmnd+oNZJn3h80/cyb lrS0xzqZBhX4bqPky5eT5vZhq/DaD0y3/e0045ecSEJUibUZ3r8QOc278WqwRkZqFwOC FJQUBnBjLBtTz+EgXQjDGPWLBrbcDtnxSMIN2F+pG8ENAV3mHrc7gLhEJEuCiR89z8QI 87XQ== X-Gm-Message-State: APjAAAV2UiDINI6BcYMywJ1adaEhPLMKXgkyTjhOmirCqabS8DUSkzT8 E1OzvbJvzz4R2k6oOXne0RMz2dIQCeulAAoMbk7KpQ== X-Google-Smtp-Source: APXvYqwfMbmbU307S+ofRDJWFvcSwvqiP5CnLmV+PzSI3x4ArMDJl822JIaBSJVdKUxXvc8G7JLJ40mG13bVJ7OMMnk= X-Received: by 2002:a6b:641a:: with SMTP id t26mr4371026iog.3.1562334295963; Fri, 05 Jul 2019 06:44:55 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20190705132842.GA21074@prometheus.u-strasbg.fr> References: <20190703135824.GA19289__20170.6622539618$1562162400$gmane$org@prometheus.u-strasbg.fr> <20190703142831.dc762dlvgaxxvbmr@chaz.gmail.com> <20190705132842.GA21074@prometheus.u-strasbg.fr> From: Mikael Magnusson Date: Fri, 5 Jul 2019 15:44:55 +0200 Message-ID: Subject: Re: zsh poor performances while reading and testing ? To: Marc Chantreux Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On 7/5/19, Marc Chantreux wrote: > hello, > >> You'll probably find that they are all as inefficient for >> non-seekable non-peekable input like pipes. > > actually my point making this bench was: don't use shell to write > serious filters. however i really appreciate knowing why this difference > exists. thanks a lot. > >> IFS= read -r line > > ok for -r but as long as i use only one variable, why is it important to > use IFS= ? % echo ' hello ' | IFS= read -r one; echo -E - _${one}_ _ hello _ % echo ' hello ' | read -r one; echo -E - _${one}_ _hello_ -- Mikael Magnusson