[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inline build_string performance
From: |
Andreas Schwab |
Subject: |
Re: inline build_string performance |
Date: |
Tue, 26 Jun 2012 17:17:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Paul Eggert <address@hidden> writes:
> Trunk bzr 108742 changed build_string from a standard
> extern function to a static inline function:
>
> static inline Lisp_Object
> build_string (const char *str)
> {
> return make_string (str, strlen (str));
> }
>
> This is not an unalloyed win, since it bloats the
> size of the Emacs executable, as callers to build_string
> often now have two function calls (strlen + make_string),
> not one (just build_string).
On the plus side the argument of build_string is often a constant which
causes the strlen call to be optimized out completely.
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- inline build_string performance, Paul Eggert, 2012/06/26
- Re: inline build_string performance,
Andreas Schwab <=
- Re: inline build_string performance, Dmitry Antipov, 2012/06/26
- Re: inline build_string performance, Paul Eggert, 2012/06/26
- Re: inline build_string performance, Dmitry Antipov, 2012/06/26
- Re: inline build_string performance, Paul Eggert, 2012/06/26
- Re: inline build_string performance, Dmitry Antipov, 2012/06/26
- Re: inline build_string performance, Paul Eggert, 2012/06/26
- Re: inline build_string performance, Eli Zaretskii, 2012/06/26
- Re: inline build_string performance, Thien-Thi Nguyen, 2012/06/26
Re: inline build_string performance, Stefan Monnier, 2012/06/26