]> git.eshelyaron.com Git - emacs.git/commit
mapconcat fast path with `identity` function argument
authorMattias Engdegård <mattiase@acm.org>
Wed, 14 Sep 2022 16:46:40 +0000 (18:46 +0200)
committerMattias Engdegård <mattiase@acm.org>
Thu, 15 Sep 2022 07:40:08 +0000 (09:40 +0200)
commitf941cc76df7476a055350b3b1b7e9e61d1ddb246
treeb1d38295911eaa0eeb189e2e0ed44ca65f2d1587
parent429e61b130232e69531f7d44b2bc610d43c8217d
mapconcat fast path with `identity` function argument

This makes (mapconcat #'identity SEQ) slightly faster than
(apply #'concat SEQ), which used to be much faster.
Notably, `string-join` benefits from this change as it uses mapconcat.

* src/fns.c (Fmapconcat): Speed up execution when the function
argument is `identity`.
src/fns.c