all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: Changes in GC and in pure space
Date: Wed, 4 Sep 2019 12:15:40 -0700	[thread overview]
Message-ID: <ade99030-0357-7a9d-84c4-815452a571c7@cs.ucla.edu> (raw)
In-Reply-To: <878sr3rjva.fsf@telefonica.net>

Óscar Fuentes wrote:
> At least in the C++ world, `inline' is used for putting function
> definitions on headers, not for inlining.
> 
> There is a consensus from many years ago that the compiler is expected
> to do the right thing wrt inlining irrespectively of the presence or
> ausence of the keyword

Things are a bit different in C. In C, the consensus you mention holds for 
'static inline' (where the 'inline' is typically just a noise word nowadays), 
but it does not hold for the plain 'inline' functions that we're talking about 
because C requires that if one compilation unit defines a plain 'inline' 
function, then exactly one other compilation unit must define that function as 
'extern inline'.

Emacs rarely uses 'static inline', due to the consensus that you mention. In the 
few exceptions where Emacs does use 'static inline', I vaguely recall there 
being performance advantages when compiled by GCC in typical platforms, as GCC 
does not ignore the 'inline' in these exceptional situations.



  reply	other threads:[~2019-09-04 19:15 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190721193221.1964.53182@vcs0.savannah.gnu.org>
     [not found] ` <20190721193222.8C19E20BE2@vcs0.savannah.gnu.org>
2019-07-22  4:12   ` [Emacs-diffs] master 5d4dd55: Fix lifetime error in previous patch Pip Cet
2019-07-22 13:40     ` Stefan Monnier
2019-07-23  1:06       ` Paul Eggert
2019-07-22 15:00     ` Changes in GC and in pure space (was: [Emacs-diffs] master 5d4dd55: Fix lifetime error in previous patch) Eli Zaretskii
2019-07-22 17:47       ` Paul Eggert
2019-07-22 18:19         ` Changes in GC and in pure space Eli Zaretskii
2019-07-22 19:58           ` Stefan Monnier
2019-07-23  1:43             ` Paul Eggert
2019-07-23 14:46               ` Eli Zaretskii
2019-07-23 16:27                 ` Paul Eggert
2019-07-23 16:58                   ` Eli Zaretskii
2019-07-23  2:25             ` Eli Zaretskii
2019-07-23  1:29         ` bug#36769: portable dumper mishandles user-defined hashtabs Paul Eggert
2019-07-23  2:06           ` Paul Eggert
2019-07-22 19:05       ` Changes in GC and in pure space (was: [Emacs-diffs] master 5d4dd55: Fix lifetime error in previous patch) Pip Cet
2019-07-23 14:56         ` Eli Zaretskii
2019-07-23 15:33         ` Changes in GC and in pure space Stefan Monnier
2019-07-24  3:06           ` Richard Stallman
2019-08-15  9:34         ` Changes in GC and in pure space (was: [Emacs-diffs] master 5d4dd55: Fix lifetime error in previous patch) Paul Eggert
2019-08-16 13:34           ` Pip Cet
2019-08-22  0:25             ` Paul Eggert
2019-08-22  2:06             ` Paul Eggert
2019-08-22  5:36             ` Paul Eggert
2019-09-04  6:05             ` Paul Eggert
2019-09-04 14:51               ` Eli Zaretskii
2019-09-04 16:56                 ` Paul Eggert
2019-09-04 17:36                 ` Daniel Colascione
2019-09-04 17:45                 ` Changes in GC and in pure space Stefan Monnier
2019-09-04 18:34                   ` Óscar Fuentes
2019-09-04 19:15                     ` Paul Eggert [this message]
2019-09-05  7:04                   ` Paul Eggert
2019-07-24  2:58       ` Changes in GC and in pure space (was: [Emacs-diffs] master 5d4dd55: Fix lifetime error in previous patch) Richard Stallman
2019-09-04 22:58 Changes in GC and in pure space Angelo Graziosi
2019-09-05  0:51 ` Paul Eggert
2019-09-05  2:56 ` Stefan Monnier

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=ade99030-0357-7a9d-84c4-815452a571c7@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /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.