diff options
| author | Dmitry Antipov | 2012-07-10 12:43:46 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-07-10 12:43:46 +0400 |
| commit | 2a0213a6d0a9e36a388994445837e051d0bbe5f9 (patch) | |
| tree | b7e4d5c2ef5d4061e083ef2123c1fc72ad46d93d /src/ChangeLog | |
| parent | cb1caeaf2ba26df05e8f9bcd4aa63203cef781fb (diff) | |
| download | emacs-2a0213a6d0a9e36a388994445837e051d0bbe5f9.tar.gz emacs-2a0213a6d0a9e36a388994445837e051d0bbe5f9.zip | |
Optimize pure C strings initialization.
* lisp.h (make_pure_string): Fix prototype.
(build_pure_c_string): New function, defined as static inline. This
provides a better opportunity to optimize away calls to strlen when
the function is called with compile-time constant argument.
* alloc.c (make_pure_c_string): Fix comment. Change to add nchars
argument, adjust users accordingly. Use build_pure_c_string where
appropriate.
* buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
* keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
* xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5815c83ae1e..b0f000cadd0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,19 @@ | |||
| 1 | 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru> | 1 | 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 2 | ||
| 3 | Optimize pure C strings initialization. | ||
| 4 | * lisp.h (make_pure_string): Fix prototype. | ||
| 5 | (build_pure_c_string): New function, defined as static inline. This | ||
| 6 | provides a better opportunity to optimize away calls to strlen when | ||
| 7 | the function is called with compile-time constant argument. | ||
| 8 | * alloc.c (make_pure_c_string): Fix comment. Change to add nchars | ||
| 9 | argument, adjust users accordingly. Use build_pure_c_string where | ||
| 10 | appropriate. | ||
| 11 | * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c, | ||
| 12 | * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c, | ||
| 13 | * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate. | ||
| 14 | |||
| 15 | 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 16 | |||
| 3 | Avoid calls to strlen in miscellaneous functions. | 17 | Avoid calls to strlen in miscellaneous functions. |
| 4 | * buffer.c (init_buffer): Use precalculated len, adjust if needed. | 18 | * buffer.c (init_buffer): Use precalculated len, adjust if needed. |
| 5 | * font.c (Ffont_xlfd_name): Likewise. Change to call make_string. | 19 | * font.c (Ffont_xlfd_name): Likewise. Change to call make_string. |