emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes in GC and in pure space


From: Stefan Monnier
Subject: Re: Changes in GC and in pure space
Date: Wed, 04 Sep 2019 22:56:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]