]> git.eshelyaron.com Git - emacs.git/commit
Minimize ‘equal’ calls in (delete x vector)
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Aug 2020 17:48:37 +0000 (10:48 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Aug 2020 18:19:51 +0000 (11:19 -0700)
commitb467bb531e1ab0eed57e1889004d2115e80e4292
tree844d23f28d438f66dd8659dec46baf081722888f
parente97def2bbce7777d3afc916a5aa4d951fab5f3f4
Minimize ‘equal’ calls in (delete x vector)

* src/fns.c (Fdelete): When deleting from a vector, call Fequal
only once per vector element.  This is faster when Fequal is slow,
and avoids the need to preinitialize the vector result.  Finish
when the result is exhausted, not when the input is exhausted;
the two are equivalent but the former may be faster.
* test/src/fns-tests.el (test-vector-delete): New test.
src/fns.c
test/src/fns-tests.el