bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12541: Prefer plain 'static' to 'static inline'.


From: Eli Zaretskii
Subject: bug#12541: Prefer plain 'static' to 'static inline'.
Date: Sun, 30 Sep 2012 20:33:04 +0200

> Date: Sun, 30 Sep 2012 10:58:57 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: 12541@debbugs.gnu.org
> 
> On my platform (GCC 4.7.2 -O3, x86-64, Fedora 17, trunk bzr 110287)
> GCC does not always inline 'bidi_char_at_pos': in a couple of cases
> the function is only partly inlined.

Is this so with either 'static inline' or with 'static'?  More
generally, is there any difference, in terms of generated code, that
you see between using and not using 'inline' for these functions?

If you don't see any difference, I guess modern platforms are fast
enough to make non-inlined versions fast enough, or else people would
have complained long ago.

> With the proposed change, the set of functions that are not always
> inlined expands to bidi_cache_iterator_state, bidi_char_at_pos, and
> bidi_fetch_char, and (if we also include functions that are partially
> inlined) bidi_cache_search and bidi_get_type.

Were they also not inlined before the change?

> I don't offhand see how this would slow down Emacs significantly,
> as these functions are fairly large.

They are in the innermost loops of the display engine.  They are
called whenever the display engine needs to examine the next character
for display.

> Is there some benchmark I could try out, to see the performance
> effects that are of concern here?

My old benchmark was to run the reordering engine, as a stand-alone
program, on a large text file.  But that was long ago (10 years), so
perhaps my conclusions from those runs are no longer valid.





reply via email to

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