unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Angelo Graziosi <angelo.g0@libero.it>
Cc: emacs-devel@gnu.org
Subject: Re: Changes in GC and in pure space
Date: Wed, 04 Sep 2019 22:56:02 -0400	[thread overview]
Message-ID: <jwv4l1rpiuq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <2010764194.349968.1567637920154@mail1.libero.it> (Angelo Graziosi's message of "Thu, 5 Sep 2019 00:58:40 +0200 (CEST)")

> When I was a kid I was taught that macros are preferable to functions if
> these are short, don't use loop etc., and this to save on the cost of the
> function call.. also old FORTRAN has 'statement functions'.
[...]
> Maybe all I learned from Borland manuals was wrong...

I don't think we can expect Emacs will be compiled by a compiler
comparable to Borland's (these were focused on generating code as fast
as possible).

Nowadays compilers work hard to encourage you to write readable code and
to focus your optimization efforts on algorithmic changes rather than
low-level micro-optimization (since these may just as well end up being
pessimizations unless you really know what's going on).

This said, I'd expect that using macros to perform "manual inlining" can
still be beneficial for the case where you compile with -O0 (which is
why I asked Paul to still use such macros in a few specific places where
it seemed worthwhile: I use -O0 most of the time).


        Stefan




  parent reply	other threads:[~2019-09-05  2:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [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 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-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 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-09-04  6:05             ` Paul Eggert
2019-09-04 14:51               ` Eli Zaretskii
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
2019-09-05  7:04                   ` 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=jwv4l1rpiuq.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=angelo.g0@libero.it \
    --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).