From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13392 invoked by alias); 19 Mar 2018 09:07:44 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42483 Received: (qmail 5315 invoked by uid 1010); 19 Mar 2018 09:07:44 -0000 X-Qmail-Scanner-Diagnostics: from mail-pl0-f47.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.160.47):SA:0(1.6/5.0):. Processed in 0.851274 secs); 19 Mar 2018 09:07:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FSL_HELO_FAKE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: joeypabalinas@gmail.com X-Qmail-Scanner-Mime-Attachments: |signature.asc| X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dZ9gHtKnf63Cvg2N8ftCTLYBNyD0RHpXN1xPa6uUfyc=; b=RNwEsseX7QxMJrsIOr9kXEZWngnLsqxwnalCk14/QngiOng+8hgV30+DCKdT+lthKh HYnaoH02bod3un6qMZ1iRIijg/JENUNYsAinB61U3zsrdeKNikabkxdrCcTQs3p+1kEF EiIEmpTrQw9gkuA0nv3kfHtcWln078RtNyZ2z2fyIt4VjSg3pYksLAxu4u3gLD0u9bXW hONLU+YdindKj2U7yCpBGFYcP38qjtprrZmJYYfGcQTAqvuXNqveKxyhfHej0/rKAA/m DBYzJ3T53fXgvX+xALhQAZItcSwWgclvQHuyA7bvBL38vDKks0rkXdoiwuxx1sWpzKuv pmpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=dZ9gHtKnf63Cvg2N8ftCTLYBNyD0RHpXN1xPa6uUfyc=; b=FHu0EI770P0Rsh41Tj/o1xaraI49w/4cSw3kZrbCHeMnPxAkq4jZxRPYv/fAJRlhpn xD/7/7ku5Czqqpc7eLv/hF8QtC1CZP7zH9/VfsRJnBTOkeRgLUdH0RNHD+6drUlxwfB+ C8BqEqEhyDJ5hhKMWfC7tk2Ep8m0AnmIvBFftWMMAZy2iA/V/4WeIyUiSVloSmj2hK0X bFy338g9t/5B1EayN0cxJ5gWJrhP77vqTZMQrdvNnS8KTq5EZjzzDR2V157Xitzn7CwT VGI1Pjp2/jf5zb4uEIqAEuFuRBZp73yvZ01/8FmDY2x3cNaSoWWnWU9HKJRfQ/03MfDk gTSg== X-Gm-Message-State: AElRT7FrgmW50rgSndteBS0HVoTDBC1bqPagrUS9YW5HoNzOQTXSQWyN UI28TwsqEMvz7b5QhcUKRec= X-Google-Smtp-Source: AG47ELuNLmwL6Cb//y8/ZJ/EduGRDNBUcWQcqhGfOdko0DBduA6yE6QMr1dSlteGaKAtq8E635u4/Q== X-Received: by 2002:a17:902:ac96:: with SMTP id h22-v6mr11459434plr.93.1521450461285; Mon, 19 Mar 2018 02:07:41 -0700 (PDT) Date: Sun, 18 Mar 2018 23:07:38 -1000 From: Joey Pabalinas To: Oliver Kiddle Cc: "zsh-workers@zsh.org" , Joey Pabalinas Subject: Re: Why sourcing a file is not faster than doing a loop with eval, zle -N Message-ID: <20180319090738.hyri7bnr5siowjuk@gmail.com> References: <20171223221910.vmob22b7uosan5os@nibbler.alyptik.lan> <7096.1521281564@thecus> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hxvda4kql5yaqt37" Content-Disposition: inline In-Reply-To: <7096.1521281564@thecus> User-Agent: NeoMutt/20180223 --hxvda4kql5yaqt37 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On Sat, Mar 17, 2018 at 11:12:44AM +0100, Oliver Kiddle wrote: > I didn't really follow the original discussion. But if getline() solves > an issue and the #ifdef mess to handle old systems isn't too bad (at > least compared to the rest of the shell) then I'd say cook up a patch. > For compatibility, getline() is the sort of thing where we can just > include a replacement implementation so the mess can be separate from > the actual code. I've included a suitable implementation below. After spending a bit of time writing up a patch and testing it, getline() unfortunately didn't seem to solve the original performance problem in any sort of ground-breaking way, and so after thinking it over a bit more, I don't really think this would end up being would be any sort of worthwhile solution. For such a tiny performance benefit, it seem like we would be better served looking for a solution somewhere else. The getline() replacement implementation was very appreciated, anyway; even though this ended up going nowhere, it saved me a day or two in getting here :) --=20 Cheers, Joey Pabalinas --hxvda4kql5yaqt37 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKlZXrihdNOcUPZTNruvLfWhyVBkFAlqvfdoACgkQruvLfWhy VBmyZRAApGGXRa2k+6UMsJJsMCJ2F37s+FsIRUitFxH/r028qG38oGrgTs7fLNMo qOvMnzaiqPbX/2vu/EayycKWp2t/NqQuc0HpGr8BX5PNIzfzp2vgXg1WZUQAJnPx tlWvV3ysoian6gopm2jQLIgqzcrbdddPyUfm8glIO2bRDvzFdKuHIQwqOimaH6MK 7uXKSu4EpysUWpOYNnG81uue3FFa2gZWQkJPmlZgflfVt6MxvUhCHst0TS8d2Tu6 c8VR9q7hp893UaR6+qfKQnybajMkgUlQR7NuP9Hb+VYA6tsmk505K0+bts6CZueC ZHKJGotVY4Zygi0gRjUSKwXIKr9EU6m8zT74BdRw6t3j890ApXVVRsKfxgWUa0Qz +EWFGFykBBxVLW7HuN7mk2g5Z86FRKnHSORW2eygBT2Zr0o1vHwIUjnkDTvVlgI/ nE2Fkc4s3gJq51ir4ky9Mr2yONETHec4MFRw1tExq2wzWDPyHOf5q1ehCsPrznxd tp6i8tgm+u3ooF+hQDmlVDyPVoNcv8toeBtzJRsCx3Qyt/QnW9KnJsrD3g0a/ZJn v9PgZh+TRoBE8yEyfWBvieGPk46wlnqW/7Y/1pT47KXFayNyal96wqHKAzVfxTb+ tYyErcbHPw5/eX/HDg1r3hrE+6ve0kyPMFb3/yBAfvhB66gCrrI= =+Ftz -----END PGP SIGNATURE----- --hxvda4kql5yaqt37--