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: Re: Inlining doesn't happen on OS X: big performance problem Date: Thu, 19 Sep 2013 14:11:49 -0700 Message-ID: <523B6895.5070005@dancol.org> References: <523AFDA5.4030607@dancol.org> <87y56s3h2f.fsf@igel.home> <523B656E.7020700@dancol.org> <87y56sikui.fsf@igel.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1MukRdppSII2aMQEPQ4K1nHJLqlq3pKcv" X-Trace: ger.gmane.org 1379625196 22425 80.91.229.3 (19 Sep 2013 21:13:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Sep 2013 21:13:16 +0000 (UTC) Cc: Paul Eggert , Emacs development discussions To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 19 23:13:16 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 1VMlXF-0005iq-Nh for ged-emacs-devel@m.gmane.org; Thu, 19 Sep 2013 23:13:13 +0200 Original-Received: from localhost ([::1]:53082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMlXE-0007MF-QH for ged-emacs-devel@m.gmane.org; Thu, 19 Sep 2013 17:13:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMlX6-0007L4-Cf for emacs-devel@gnu.org; Thu, 19 Sep 2013 17:13:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMlX0-00018E-7S for emacs-devel@gnu.org; Thu, 19 Sep 2013 17:13:04 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:40110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMlX0-000187-1A for emacs-devel@gnu.org; Thu, 19 Sep 2013 17:12:58 -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 1VMlWz-00081W-01; Thu, 19 Sep 2013 14:12:57 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <87y56sikui.fsf@igel.home> 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:163482 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1MukRdppSII2aMQEPQ4K1nHJLqlq3pKcv Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 9/19/13 2:04 PM, Andreas Schwab wrote: > Daniel Colascione writes: >=20 >> On 9/19/13 9:35 AM, Andreas Schwab wrote: >>> Daniel Colascione writes: >>> >>>> Can we please remove these "!defined __APPLE__" tests and start inli= ning >>>> functions again in OS X? >>> >>> Why doesn't the compiler inline static functions by itself? >> >> Why should it? >=20 > There is no reason not to do it. Sure there is: programs would be huge if compilers naively treated every "static" as "inline, so they don't. Instead, compilers inline some static functions, some of the time, and the heuristics they use for deciding whether to do that are inscrutable and variable. Why should we rely on these heuristics for good performance when we just write "static inline" and make the decision ourselves? If we've identified a bit of inlining as performance critical, there is every reason to tell the compiler "this is important" instead of just hoping that the compiler figures it out on its own. We shouldn't strip these hints from existing code, at least. >> Why should we remove this hint? >=20 > "Hint" is the essential hint. What's wrong with leaving hints in the code? We still have "register" all over the place, and "static inline" does much more than "register". --1MukRdppSII2aMQEPQ4K1nHJLqlq3pKcv 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) iQIcBAEBAgAGBQJSO2iaAAoJEMAaIROpHW7IIP8P/0Va/jv69rKfvAmSg+PiUL0/ Py6mzALUog7nWkA/tbWbnGKsrOdlTvDV+vr7Fp5UpcsUuQSA/CAbpXkOIv0ZLIW0 jbt7lkn3Cy9mODRT3+WZ4qCiMAWFXpQm9HpwZn0moekar/fsDtnlLTcDTXCiZKh5 DiuyYM9TC4WSxdso6/LkUPKyl9uWx7D2NsLLzKztKy11cht2nzjBdd/2LNbOkqc2 dc7PKD6Vb8QTbygO+yvAk/+F9mE6dvVkzQy90p5GRfjkn71kRRoiH396tZddyvwA 2qzw+UYMjwQbeMs9ZnUour8k9ZJWMekkjhTmq+f0dzQxWiynWXZ1VunKbQPdEcLR Ub0IJEjYc5J9X9lOqkpCbCzpHF8MZNeKVgyTxVFjtAU4wIj3NCwvpEjKrAGieZKR LT9u/jR4+rwjTt2/YSqJJS2CiNop6nBIEvCc4oZwNS8xS3ZPDEZmqLa3Tr4Yg7oj nidPsqYNLd1MmehbyUq5+ui0ev+DhJ994+iWcMHNvwWl9zzKgAqLi8p3icgRB8Ph mL/gKj4JnzZfVuezGRYY1j4lK0y6b4CmDtfy8EAlVKKR1acxjGSdGSEGsZHsaSnM Q+OiBomHzuubPXurd0/RbLIV80qLxw0oej1plt+7+wCPb7edVUUbym8k3JkAHhHb 9zJ7AdOxIAJk2Oi9Tvti =b7gy -----END PGP SIGNATURE----- --1MukRdppSII2aMQEPQ4K1nHJLqlq3pKcv--