diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-01-21 10:00:19 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-01-25 15:51:25 +0100 |
commit | 697723b63d69ee6d32a82ab2c88e0ce1e65257ed (patch) | |
tree | 9d51c5f5deacb49d40833e1ac1e8df0b36ac8600 /src/syntax.c | |
parent | f16039b16120abd0b7e1293292f90d69358e0fef (diff) | |
download | emacs-697723b63d69ee6d32a82ab2c88e0ce1e65257ed.tar.gz emacs-697723b63d69ee6d32a82ab2c88e0ce1e65257ed.tar.bz2 emacs-697723b63d69ee6d32a82ab2c88e0ce1e65257ed.zip |
Faster concat, append, vconcat, copy-sequence, etc
Split the C auxiliary function `concat` into separate functions for
string and list/vector as target types, respectively. This makes them
simpler and faster.
Implement `Fcopy_sequence` more efficiently for strings, lists and
vectors instead of using `concat`.
The result is a significant performance increase for the Lisp
built-ins concat, append, vconcat, copy-sequence and anything using
them such as mapconcat, copy-alist and propertize.
* src/fns.c (concat2, concat3, Fconcat): Use concat_strings.
(Fappend, Fvconcat): Adapt to changed signature of concat.
(Fcopy_sequence): Faster implementation for lists, strings, and vectors.
(concat_strings): New.
(concat): Strip code for string target, simplify, optimise.
(Fcopy_alist): Use Fcopy_sequence.
Diffstat (limited to 'src/syntax.c')
0 files changed, 0 insertions, 0 deletions