From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Inlining doesn't happen on OS X: big performance problem Date: Thu, 19 Sep 2013 06:35:33 -0700 Message-ID: <523AFDA5.4030607@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XfiJEST2a2P88vc4JUvqgTkF32DTMddJA" X-Trace: ger.gmane.org 1379597833 10326 80.91.229.3 (19 Sep 2013 13:37:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Sep 2013 13:37:13 +0000 (UTC) To: Emacs development discussions , Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 19 15:37:14 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VMePw-00043C-Ps for ged-emacs-devel@m.gmane.org; Thu, 19 Sep 2013 15:37:12 +0200 Original-Received: from localhost ([::1]:51258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMePv-0005p0-Rg for ged-emacs-devel@m.gmane.org; Thu, 19 Sep 2013 09:37:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMePk-0005ni-Ej for emacs-devel@gnu.org; Thu, 19 Sep 2013 09:37:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMePa-0007eR-61 for emacs-devel@gnu.org; Thu, 19 Sep 2013 09:37:00 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:38869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMePZ-0007dP-Vy for emacs-devel@gnu.org; Thu, 19 Sep 2013 09:36:50 -0400 Original-Received: from c-76-22-66-162.hsd1.wa.comcast.net ([76.22.66.162] helo=[192.168.1.2]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1VMePR-0007KT-Ct; Thu, 19 Sep 2013 06:36:41 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 X-Enigmail-Version: 1.5.2 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163461 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XfiJEST2a2P88vc4JUvqgTkF32DTMddJA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Currently, gnulib converts "inline" to "static" on OS X. In particular, config.h uses this logic from m4/extern-inline.m4: #if ((__GNUC__ \ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ : (199901L <=3D __STDC_VERSION__ \ && !defined __HP_cc \ && !(defined __SUNPRO_C && __STDC__))) \ && !defined __APPLE__) =2E.. #elif (2 < __GNUC__ + (7 <=3D __GNUC_MINOR__) && !defined __STRICT_ANSI__= \ && !defined __APPLE__) =2E.. #else # define _GL_INLINE static _GL_UNUSED # define _GL_EXTERN_INLINE static _GL_UNUSED #endif Using "static" for "inline" comes at a tremendous cost in performance. Compiling with gcc 4.2.1 -O2, Emacs HEAD takes 113.9 seconds to font-lock-fontify-buffer lisp.h ten times. If I replace "!defined __APPLE__" with "1" above, Emacs compiles and runs perfectly well (albeit with some warnings about missing declarations) and performs the same task in only 36.8 seconds. Disassembly confirms that in the current configuration, nothing is actually being inlined. Can we please remove these "!defined __APPLE__" tests and start inlining functions again in OS X? --XfiJEST2a2P88vc4JUvqgTkF32DTMddJA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (Darwin) iQIcBAEBAgAGBQJSOv2qAAoJEMAaIROpHW7IP6UQAIW14j23iNgyPuQ6s27dCXSu CFQRDfSGrztkmX/7gm173KAzSDdlRV+MEjBs9KVu9p48/k1WyAlMXlnq1VvtwwTa b33ztusyh97qYG2s6eIDcujHKkd5MBQO4EVJx2OvkWgDBqSkZ/JvsWKYGvQ9jcjA lB2rpoppkfoE3HvlKXcy+/QbnnGNdkV8iOuYwuj1ZZDynOWIPquQ0rtQVuLRPALC QMe4nbDCXYxssY7trtliz0t6fMt6QlcS83MiBozx0oKJaIIaSNqhR+3dWUsSSYFG mxrJlKrGNw84RaTmmVbrFKZFtHmBGT6oVLEtnyZ6dfGMCiwk8ATBt93rebFox1LU V+EhjC0yqzgXqerNYHk0YdmrX7GjydrJVFlzhiaE8zFEZX1r826TmlZ6z1KPoX1k pXe1FlV5oxvvQU5SFsvfxwwoFv8lvWURdq4GSm5G8GmEjhEy14Q+eLuf6rIvyvcB OlMbb/TOkPzdA7jch8CrGVlGTOmernSFDTSMS/2FT8tMGilUh+qRO1sHyGgAnJTz DzYV1ef5/3C89j2dRE6wzES9YPhd3kdllRC9eCZff4Vt+EnfJ3BfjzA30x3iHzLq CRa1uIqYJq/hwIqsYtLZUgg4KKmInhA3x0QhVWaC4Pu8U5hCgrIEVbJsr9LoHQf0 LvQ/FXr/d/Je3SxMPg4r =JShq -----END PGP SIGNATURE----- --XfiJEST2a2P88vc4JUvqgTkF32DTMddJA--