A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-March/132924.html below:

[Python-Dev] Start writing inlines rather than macros?

[Python-Dev] Start writing inlines rather than macros? [Python-Dev] Start writing inlines rather than macros?Stefan Krah stefan at bytereef.org
Tue Mar 4 10:55:27 CET 2014
Skip Montanaro <skip at pobox.com> wrote:
> I do have one question though. Suppose you encounter a compiler that
> doesn't understand the inline keyword, so you choose the static
> declaration as Kristján suggested. The resulting Python executable
> should be functionally correct, but if the optimizer doesn't happen to
> inline a given static function you might be stuck with some bad
> performance across-the-board (if it never inlines, or doesn't inline
> where we really need it to), or only under some circumstances (as a
> hypothetical example, inlining in dictobject.c, but not in ceval.c).
> Is there a configurable way to tell if a compiler will inline
> functions which are declared static, and possibly under what
> conditions they might not? It might still be necessary to maintain
> macros for those platforms.

I think that all modern compilers can handle "static inline" in header
files.

If you have a compiler that cannot, chances are that the platform is horribly
outdated and this particular performance issue will be relatively benign
compared to other ones.


Stefan Krah



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4