From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Using __builtin_expect (likely/unlikely macros) Date: Sat, 20 Apr 2019 11:58:36 -0700 Organization: UCLA Computer Science Department Message-ID: References: <87a7gst973.fsf@gmail.com> <875zrgt12q.fsf@gmail.com> <6919a4c8-df76-ea1e-34db-1fa62a360e5a@cs.ucla.edu> <87h8aykdod.fsf@gmail.com> <4fa7885e-8c66-c7c4-ff71-a013505863af@cs.ucla.edu> <2dfb837d-989d-c736-b6e6-b20c0e940596@cs.ucla.edu> <87o956c4n4.fsf@gmail.com> <1fbd2fca-18f0-0a90-7a45-58419a9e11ee@cs.ucla.edu> <1555450070.23658.4@yandex.ru> <66b74701-012a-902e-4a5b-6bc30efa87c0@cs.ucla.edu> <87tveu85xt.fsf@gmail.com> <86ef5wd7az.fsf@gmail.com> <9461246c-409b-15fd-943b-3d673c679870@cs.ucla.edu> <87imv8prov.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="46512"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cc: emacs-devel@gnu.org To: =?UTF-8?Q?=c3=93scar_Fuentes?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 20 20:59:28 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hHvCy-000C0U-DF for ged-emacs-devel@m.gmane.org; Sat, 20 Apr 2019 20:59:28 +0200 Original-Received: from localhost ([127.0.0.1]:44407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHvCx-0002HG-Gl for ged-emacs-devel@m.gmane.org; Sat, 20 Apr 2019 14:59:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHvCC-0002Fq-F2 for emacs-devel@gnu.org; Sat, 20 Apr 2019 14:58:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHvCB-0006fk-LG for emacs-devel@gnu.org; Sat, 20 Apr 2019 14:58:40 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:38194) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hHvCB-0006fN-Fx for emacs-devel@gnu.org; Sat, 20 Apr 2019 14:58:39 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B07891616EA; Sat, 20 Apr 2019 11:58:37 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 2HdZKDqMp8lG; Sat, 20 Apr 2019 11:58:36 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E06FC1616F9; Sat, 20 Apr 2019 11:58:36 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ygLwKQlAYQ6Z; Sat, 20 Apr 2019 11:58:36 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id AE2DD1616D9; Sat, 20 Apr 2019 11:58:36 -0700 (PDT) In-Reply-To: <87imv8prov.fsf@telefonica.net> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:235709 Archived-At: =C3=93scar Fuentes wrote: >> For improvements where the >> generated code is "obviously" faster (fewer and simpler instructions, >> say), I typically don't bother with measurements as my own time is >> limited too. > You will be surprised. >=20 > Modern hardware is complex. I'm often surprised :-), but I don't expect to be surprised when the gene= rated=20 code seems obviously faster to me. Although I'm not as expert as the comp= uter=20 architecture researcher whose office sits next to mine, I know how modern= =20 hardware works reasonably well and regularly give lectures on topics like= =CE=BCops=20 and TLBs so I won't be surprised as often as a naive programmer might be. > If the 1.3% improvement in performance requires non-minimal source code > complexity growth It doesn't. In this case the source code shrank slightly. Only very sligh= tly:=20 just by 0.001% (this counts all files under Git control). Still, a win's = a win.