Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: "G. Branden Robinson" Newsgroups: gnu.bash.bug Subject: Re: Should [[ -v 1 ]] be supported? Date: Thu, 27 Dec 2018 20:57:12 -0500 Lines: 71 Approved: bug-bash@gnu.org Message-ID: References: <5dac2cf2-2fac-0fd1-058f-6a84a3271738@case.edu> <20181228013623.mersdxbzy64dpldp@crack.deadbeast.net> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pa7hslbzkwlxcyjg" X-Trace: usenet.stanford.edu 1545962563 13654 208.118.235.17 (28 Dec 2018 02:02:43 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=U2BFx+WZ+kFOXxdzJgC3jmBZw9fl5SYGtOEaym0JQug=; b=pCRXc6LTAneH5cF143ppBWyu0IaX/zRRXuSyJ0GqYmy+AfH2c6hz+/SXhLwA8MJj4/ j4NAFUkk+iEvH/L2n4osTJZ3q6YfeHyGJtZ2b03Clpjm7d1ybDoWM/yhpfLV74g40Wuj eC0we3z3op60+mLFy7MGyQ5P9ttLAxkJKFH/iPQnhp1SY+lHZFVqXyoq0Qit++V346zF Q/P4ZB1fHf7xfxUr0uxB0/Lfuzg2bEXpvYb0osxcte+2qVYt6TYLEx0drUWCNI4VcbPc bgvVt6pKnZLSDR/nAU9hlm/7JCkAQjeI2H7z3pCGyKlwHUJjlWRk4VcESNa6ARE9RGX3 ml5A== 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:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=U2BFx+WZ+kFOXxdzJgC3jmBZw9fl5SYGtOEaym0JQug=; b=T3TulqyPaommeCHIV5+J+QzHvJkbvoBfjmSDV1cOZ6VuZNEgtzgBFPnWVul6MV/4v/ vcSA4KEgx5lBXucF5tl2gkxOv9gXazDeWzAY0oaq++cto4GzZiMCge6fHa020ZKZZ6Rv 6TDkIIB6ASnbRw2FzUpcFtja41c/Nd1qKndLDcdj2M85TBrJrhACH/PzVHhxAtn9+mZx Rk+4mcdkhYFLFAHit5GFEbHGOL0bXrP8ap64aI57TaFQ2FamNH3HtKPcJYwl/lsN30Rd V/7OSGmhzi/BTO779Ge87wYi80nYPPu0wNJKDJI47owkpr67yX9LpGUyXKzGvUGgPOEH 3KyQ== X-Gm-Message-State: AA+aEWaC+0oesTLA0rXl2e7f7HZJoq0Any7fk0Z4mhaWIRZcQZrVpdV5 N86BoLP1RjHe5U4fVsHwNhFLVj3ofjs= X-Google-Smtp-Source: AFSGD/XDzt/8d3bmoVAXoKb01Qw6FdFctRbTv4baHU76rdCfRQrlq6GWZQdw6tHZHfLdSrTi4sj+ag== X-Received: by 2002:a81:7342:: with SMTP id o63mr26950764ywc.131.1545962236654; Thu, 27 Dec 2018 17:57:16 -0800 (PST) Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::c32 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:14982 --pa7hslbzkwlxcyjg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable At 2018-12-27T19:47:08-0600, Peng Yu wrote: > On Thu, Dec 27, 2018 at 7:37 PM G. Branden Robinson > > As others have noted, if you are worried about marginal performance > > impacts this small, margin you are probably writing in the wrong > > language, or distracting yourself with tiny details when you do not even > > know the cyclomatic complexity of your code or the big-O classification > > of your algorithms. > > > > Attack those problems first, and see what you discover. >=20 > The problem is that bash is not systematically profiled for > performance at all. I am doing it step it by step. You're whacking moles. Use a profiler. That's what they're for. https://www.thegeekstuff.com/2012/08/gprof-tutorial/ > There are many more that I have already tested. You can not dismiss > this one just because it may not have a large impact. Yes, I can. You need to identify where bash is _actually_ spending most of its execution time, and a profiler can help you do that. You also need to establish acceptance criteria. All but the most finely-tuned code can be made more performant; often raw performance comes at a cost, such as the abandonment of memory safety. Aliasing problems are one example in software, and the Spectre and Meltdown suites of cache-related timing attacks are an examples from hardware. What is it you're trying to achieve? State your goal in terms that are "SMART": (S)pecific (M)easurable (A)ttainable (R)easonable (T)imely Just the first four would be a good start. Regards, Branden --pa7hslbzkwlxcyjg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAlwlgu8ACgkQ0Z6cfXEm bc6kVQ//aba538cOkLXrouwCKOcgzGI6E7aZoetWwmF6Tu2m/wCYe1yiDi4Ak3wu bKU5OcHZhvC9F48HhsiQUvt1Wl7NjAUIWgIsMEmHuW3LAn1thpEkwNqCPbzAuP8M cJeXMJj4AnsKalVMuiAM6D31T79QZ5zoSqX/ojrF1imWf7virZ25nYP2mY/FvqaW 9GFjOwbMPyo/eRyJaNgTzTEPcTuZ6yc/90Svi3OIxZWcFcrbIXxvcWypMMVaNWdm hnOumi0eUCB2gk8n+tEUsAk9w7NtL5jyQYzMcLTxD5krrrzvb9lhrOUXhXUQZ/Ey BzqzHZ7Ffsu4Wyv7+9BUg+kg8hX3J27Vb1N9VeDfFyMAvCnf1CY9ehNVml/ZSAFr P6zoej0fCY5rNQXOnWuk9by+oFBbTVVrQKhsOVDr05YmooeIgZKLm2PVNSYQtt6C xrgVvhOyVggwxtJ9ngD26JUy0O32iqnHfkQLjC1qfXVzLGNc+mp3oDZ4AK2ISbpE HM74xSXl1XJXUPWXYF2jKrW/243PmsBu82r67KXootPYueDZ5B5MIxdQsLw1zkGC 7I6Z9+iLPXfUxbVDqBmDO5mq2Kotcjm3zn2QoQPunXAkOIiCRMoGRWAKDVgaRlmd aCgNBlBVJXBZsl1OU9mC7/VeL/pQaCgQt2hMmRoscLLAG24Nqrk= =PSB0 -----END PGP SIGNATURE----- --pa7hslbzkwlxcyjg--