[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changes in GC and in pure space (was: [Emacs-diffs] master 5d4dd55:
From: |
Daniel Colascione |
Subject: |
Re: Changes in GC and in pure space (was: [Emacs-diffs] master 5d4dd55: Fix lifetime error in previous patch) |
Date: |
Wed, 4 Sep 2019 10:36:55 -0700 |
User-agent: |
SquirrelMail/1.4.23 [SVN] |
>> From: Paul Eggert <address@hidden>
>> Date: Tue, 3 Sep 2019 23:05:00 -0700
>> Cc: Eli Zaretskii <address@hidden>, Daniel Colascione <address@hidden>,
>> address@hidden
>>
>> In buffer.h, prefer inline functions to function-like macros
>> when either will do. This helps avoid confusion about how
>> many times an arg is evaluated. On my platform, this patch
>> improves performance of âmake compile-alwaysâ by 5.7%.
>
> How portable is "INLINE" (and if it's portable enough, why do we use a
> macro for it)? If some platforms don't support it, and these macros
> become non-inline functions, those platforms will be punished by this
> kind of changes.
>
> I FWIW, personally find the issue of confusion about macro argument
> evaluation to be a very weak one as justification to get rid of macros
> that needed approximately zero maintenance for many years. But that's
> me.
Using a bare 'inline' is fine these days. We already require C99. Macros
are awkward in many ways, e.g., being invisible in debugger traces. These
days, there are a lot of reasons to avoid macros and very few reasons to
use them, so let's just switch to inline functions like the rest of the
world has.