all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Inlining doesn't happen on OS X: big performance problem
@ 2013-09-19 13:35 Daniel Colascione
  2013-09-19 13:44 ` Ryan Johnson
  2013-09-19 16:35 ` Andreas Schwab
  0 siblings, 2 replies; 20+ messages in thread
From: Daniel Colascione @ 2013-09-19 13:35 UTC (permalink / raw)
  To: Emacs development discussions, Paul Eggert

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

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?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2013-09-20 15:37 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-19 13:35 Inlining doesn't happen on OS X: big performance problem Daniel Colascione
2013-09-19 13:44 ` Ryan Johnson
2013-09-19 15:06   ` Paul Eggert
2013-09-19 21:41     ` Paul Eggert
2013-09-20  1:47       ` Daniel Colascione
2013-09-20  4:24         ` Paul Eggert
2013-09-19 16:35 ` Andreas Schwab
2013-09-19 20:58   ` Daniel Colascione
2013-09-19 21:04     ` Andreas Schwab
2013-09-19 21:11       ` Daniel Colascione
2013-09-19 21:15         ` Andreas Schwab
2013-09-19 21:19         ` Óscar Fuentes
2013-09-19 21:18     ` Paul Eggert
2013-09-19 22:35       ` Ryan Johnson
2013-09-19 22:57         ` Paul Eggert
2013-09-20  2:35           ` Ryan Johnson
2013-09-20  6:14       ` Jan Djärv
2013-09-20  8:15         ` Dmitry Antipov
2013-09-20 14:17           ` Stefan Monnier
2013-09-20 15:37             ` Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.