unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Daniel Colascione <dancol@dancol.org>,
	Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: Inlining doesn't happen on OS X: big performance problem
Date: Fri, 20 Sep 2013 08:14:29 +0200	[thread overview]
Message-ID: <68974C3C-AD25-404F-8C13-834B234C7660@swipnet.se> (raw)
In-Reply-To: <523B6A30.3020406@cs.ucla.edu>

Hello.

19 sep 2013 kl. 23:18 skrev Paul Eggert <eggert@cs.ucla.edu>:

> On 09/19/13 13:58, Daniel Colascione wrote:
>> I don't see why we've been going through the tree and replacing
>> instances of "static inline" with "static"
> 
> See bug#12541; removing the "inline" helped performance slightly there.
> 
> More generally, these days "inline" is mostly a noise word for static
> functions, just as "register" is a noise word for locals.  Modern
> compilers inline static functions pretty well without "inline", just
> as they allocate registers pretty well without "register", and it
> saves maintenance hassle if developers don't have to waste their
> time reading the "inline" noise and worrying about whether the
> "inline" should be there.

Please do not try to motivate the current Emacs inline handling with saved maintenance hassle.  Maintenance is now a magnitude worse than before due to the complicated inline handling.

Before:

1) See INLINE in code.
2) Check out INLINE define in config.h
3) Write your new INLINE function.

Now:

1) See SYSTEM_INLINE in code.
2) Find where it is defined, 2 places, either to INLINE (as _GL_INLINE) or EXTERN_INLINE
    (as _GL_EXTERN_INLINE).
3) Figure out if INLINE or EXTERN_INLINE applies to the case at hand.
4) Find definition of _GL_INLINE and _GL_EXTERN_INLINE.
5) Manually parse complicated conditionals to see which define applies.
6) Sigh when you realize that there are unique preprocessor defines of inline per file.
7) Don't use inline as it is too complicated and convince yourself that is is OK as machines gets
    faster and faster.

Also note that there are still 'static inline' in the w32-code, so if I saw that, I might come to the conclusion that 'static inline' is OK.

I'm sure there is some motivation for the inline mess we have now, but performance is not it (previously we had fast macros) and maintenance is absolutely not it either.

	Jan D.






  parent reply	other threads:[~2013-09-20  6:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2013-09-20  8:15         ` Dmitry Antipov
2013-09-20 14:17           ` Stefan Monnier
2013-09-20 15:37             ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68974C3C-AD25-404F-8C13-834B234C7660@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=dancol@dancol.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).