From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43704-ml=inbox.vuxu.org@zsh.org 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 9ace8dd1 for ; Wed, 17 Oct 2018 19:34:43 +0000 (UTC) Received: (qmail 16313 invoked by alias); 17 Oct 2018 19:34:32 -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: 43704 Received: (qmail 24982 invoked by uid 1010); 17 Oct 2018 19:34:32 -0000 X-Qmail-Scanner-Diagnostics: from out3-smtp.messagingengine.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(66.111.4.27):SA:0(-2.6/5.0):. Processed in 6.231761 secs); 17 Oct 2018 19:34:32 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:subject:references:date :in-reply-to; s=fm1; bh=z9xSlFyRQbhgkuOtPqq80ZxXgK4r0Ckc3aJDgfKz RE0=; b=RurD7eokddm3axL/hfNuB5fZFeyxXLHTJ5H8e9e0FI7ZsTYp9wGDsqwt BXpEghoLvCABthxcsAP72k4vITQlWuTeA4Ufc0RE5kHWHLGHoXB2iff5Q9INKrnK 8oeqQw1YbOhaLKmjIqdg8nA3xQJ/i56PE3fw5IxOy8t/t49i2cTwbkl3p5H9e+gs PjsFrRmp916uUJm9priXBb0Uktt20z6cq2b5k0wdcMyJl1MLE4aj/RgGekeANDYx 0TvTqmkR0LJs+Lb3DIoRXlkKobV6Ek+++FqClgNL66tiRRDHRZtxMbe+kSPjrGKK /Hwp136z25nKU7hK3yiLDFS+ALGYcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=z9xSlFyRQbhgkuOtPqq80ZxXgK4r0Ckc3aJDgfKzR E0=; b=cTcZdHMX81ok1QXwLoUnuGwICFxprvrMEmg9BmnSGGglTMvz5VsVrmtsx E5Fnr3FweeN+QhTwZtG6NQcYyGC9z8TOQXVrN8/zh8Ac/+YcY9vo7UtdHVoJBN5e /xeC1ViVZlB/stHUGwvFI82HWX4u5DEYgTGwqte3lP/GwnQjyQIRsDLzm5vTB8nG vzF1VnBki9W06JFE61PBh599yx5K5S3rSQg04q4nwu7j9Y/y979q6s5A2gVq8D3z k5ZYnoU3SADrooYJ4DkZRYAcmnPUExeZGD2rWhbqtw7KKc4THZXrkmap9/vWYPnK A3eaGyXxBQ0l2pQa4T2TLqrCgl+tA== X-ME-Sender: X-ME-Proxy: Message-Id: <1539804862.2700189.1545590272.19CD9FF7@webmail.messagingengine.com> From: Daniel Shahaf To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-cc4e8f33 Subject: Re: [PATCH] ztrsub() execution time / 2 References: <20181017142503.ueqgcyljm3aalitf@tarpaulin.shahaf.local2> Date: Wed, 17 Oct 2018 19:34:22 +0000 In-Reply-To: Sebastian Gniazdowski wrote on Wed, 17 Oct 2018 21:02 +0200: > On Wed, 17 Oct 2018 at 16:25, Daniel Shahaf wrote: > > As far as I can tell, this patch is the sort of transformation that an > > optimizing compiler should do by itself. In fact, I'm having a hard time > > seeing how the sequence of "BRANCH IF EQUAL" / "BRANCH IF NOT EQUAL" / > > "INCREMENT" assembly instructions would be altered by the patch. > > > > If your profiling was performed on zsh compiled with -O3, I would suggest that > > you file a bug against your compiler's optimizer. > > Why not "do it right, then do it yourself"? Why ignore -O0 zsh users? > Should I subscribe to compilers mailing lists and investigate this > well defined 1-line change, i.e. possible to grasp by logic? I have a hard time charitably interpreting what you just wrote. It doesn't come across as constructive. I think the patch should not be applied because it makes the code harder to read and to maintain. Daniel