all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: emacs-devel@gnu.org
Subject: Re: Inlining doesn't happen on OS X: big performance problem
Date: Thu, 19 Sep 2013 23:19:59 +0200	[thread overview]
Message-ID: <87txhgbjb4.fsf@wanadoo.es> (raw)
In-Reply-To: 523B6895.5070005@dancol.org

Daniel Colascione <dancol@dancol.org> 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".




  parent reply	other threads:[~2013-09-19 21:19 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 [this message]
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

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

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

  git send-email \
    --in-reply-to=87txhgbjb4.fsf@wanadoo.es \
    --to=ofv@wanadoo.es \
    --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 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.