On Tue, Nov 23, 2021 at 3:15 PM Antoine Pitrou <antoine@python.org> wrote:
On Tue, 23 Nov 2021 18:00:28 +0100
Victor Stinner <vstinner@python.org> wrote:

> I didn't run benchmarks on Python built in release mode, since gcc -O3
> with LTO and PGO should inline all static inline functions and I don't
> expect any difference between macros and static inline functions.

That would actually be interesting, since there can be surprises
sometimes with compilers... (function inlining depends on heuristics,
for example, and there may be positive or negative interactions with
other optimizations)

Thanks Antoine. We definitely need to push back on such "expectations" and turn them into facts by performing careful measurements. Surprises lurk everywhere. See e.g. https://github.com/faster-cpython/ideas/issues/109#issuecomment-975619113 (and watch the Emery Berger video linked there if you haven't already).

--
--Guido van Rossum (python.org/~guido)