From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Using __builtin_expect (likely/unlikely macros) Date: Sat, 20 Apr 2019 20:22:26 +0300 Message-ID: <83wojoa8x9.fsf@gnu.org> 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> <8336mcbr62.fsf@gnu.org> <45401975-175e-841e-37da-707a9344a024@cs.ucla.edu> <831s1wbqfq.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="187441"; mail-complaints-to="usenet@blaine.gmane.org" Cc: andrewjmoreton@gmail.com, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 20 19:30:06 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 1hHtoS-000maA-0q for ged-emacs-devel@m.gmane.org; Sat, 20 Apr 2019 19:30:04 +0200 Original-Received: from localhost ([127.0.0.1]:43655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHtoQ-000144-Sj for ged-emacs-devel@m.gmane.org; Sat, 20 Apr 2019 13:30:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHtoD-0000yp-UO for emacs-devel@gnu.org; Sat, 20 Apr 2019 13:29:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHthY-00068M-Jg; Sat, 20 Apr 2019 13:22:56 -0400 Original-Received: from [176.228.60.248] (port=2255 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hHthW-0004CU-5G; Sat, 20 Apr 2019 13:22:56 -0400 In-reply-to: (message from Paul Eggert on Sat, 20 Apr 2019 09:57:14 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:235704 Archived-At: > From: Paul Eggert > Date: Sat, 20 Apr 2019 09:57:14 -0700 > Cc: andrewjmoreton@gmail.com, emacs-devel@gnu.org > > In this case the patch not only improved performance, it also made > the code smaller and in my opinion more readable: the total source > code size shrank by 1775 bytes. I meant code in C, not the produced machine code, so the size is not really relevant. I'm not sure how do you see that the code became more readable: we now have AVOID where previously we had _Noreturn, and ATTRIBUTE_COLD where we previously had nothing. Both make the code slightly less readable, IMO (because the reader must first learn what they mean).