From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Inlining doesn't happen on OS X: big performance problem Date: Thu, 19 Sep 2013 23:19:59 +0200 Message-ID: <87txhgbjb4.fsf@wanadoo.es> References: <523AFDA5.4030607@dancol.org> <87y56s3h2f.fsf@igel.home> <523B656E.7020700@dancol.org> <87y56sikui.fsf@igel.home> <523B6895.5070005@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1379625634 27716 80.91.229.3 (19 Sep 2013 21:20:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Sep 2013 21:20:34 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 19 23:20:36 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 1VMleO-0004d1-EC for ged-emacs-devel@m.gmane.org; Thu, 19 Sep 2013 23:20:36 +0200 Original-Received: from localhost ([::1]:53127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMleO-0001cX-0k for ged-emacs-devel@m.gmane.org; Thu, 19 Sep 2013 17:20:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMleB-0001cR-6T for emacs-devel@gnu.org; Thu, 19 Sep 2013 17:20:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMle4-0003U7-N7 for emacs-devel@gnu.org; Thu, 19 Sep 2013 17:20:23 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:34969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMle4-0003Su-GE for emacs-devel@gnu.org; Thu, 19 Sep 2013 17:20:16 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VMldw-0003pX-R1 for emacs-devel@gnu.org; Thu, 19 Sep 2013 23:20:08 +0200 Original-Received: from 137.red-83-61-144.dynamicip.rima-tde.net ([83.61.144.137]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Sep 2013 23:20:08 +0200 Original-Received: from ofv by 137.red-83-61-144.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Sep 2013 23:20:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 137.red-83-61-144.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:KfjcUh29zTqC/RQ6ZHoN8AEAV+c= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:163486 Archived-At: Daniel Colascione writes: >>>> Why doesn't the compiler inline static functions by itself? >>> >>> Why should it? >> >> 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? The days when the programmer knew better than the compiler about micro-optimization are long gone, even more so on cross-platform code. [snip] >>> Why should we remove this hint? >> >> "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". Nowadays "register" is as meaningless as "inline".