From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ryan Johnson Newsgroups: gmane.emacs.devel Subject: Re: Inlining doesn't happen on OS X: big performance problem Date: Thu, 19 Sep 2013 09:44:26 -0400 Message-ID: <523AFFBA.3080305@cs.utoronto.ca> References: <523AFDA5.4030607@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1379598318 16419 80.91.229.3 (19 Sep 2013 13:45:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Sep 2013 13:45:18 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 19 15:45:21 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 1VMeXn-0003na-JW for ged-emacs-devel@m.gmane.org; Thu, 19 Sep 2013 15:45:19 +0200 Original-Received: from localhost ([::1]:51287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMeXn-0001Gn-5I for ged-emacs-devel@m.gmane.org; Thu, 19 Sep 2013 09:45:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMeXd-0001G5-VR for emacs-devel@gnu.org; Thu, 19 Sep 2013 09:45:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMeXW-0001kd-MC for emacs-devel@gnu.org; Thu, 19 Sep 2013 09:45:09 -0400 Original-Received: from bureau84.ns.utoronto.ca ([128.100.132.184]:46084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMeXW-0001Y4-GY for emacs-devel@gnu.org; Thu, 19 Sep 2013 09:45:02 -0400 Original-Received: from [10.70.2.172] (sb-gw12.cs.toronto.edu [128.100.3.12]) (authenticated bits=0) by bureau84.ns.utoronto.ca (8.13.8/8.13.8) with ESMTP id r8JDikYL025640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 19 Sep 2013 09:44:47 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <523AFDA5.4030607@dancol.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 128.100.132.184 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:163463 Archived-At: On 19/09/2013 9:35 AM, Daniel Colascione wrote: > 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 <= __STDC_VERSION__ \ > && !defined __HP_cc \ > && !(defined __SUNPRO_C && __STDC__))) \ > && !defined __APPLE__) > ... > #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ > && !defined __APPLE__) > ... > #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? > Surely something that elaborate and costly was a conscious decision... have you looked through the revision history to see why this was added in the first place? (The hope is that the reason is no longer valid and the change can be reverted) Ryan