Subject: Re: bug#34852: 26.1; seq-intersection ignores nil as element

From: "Basil L. Contovounesios" <[email-masked]>
Date: Thu, 14 Mar 2019 17:02:22 +0000

Michael Heerdegen <[email-masked]> writes:

> "Basil L. Contovounesios" <[email-masked]> writes:
>
>> My first patch makes an analogous backward-compatible change using the
>> more efficient seq-position in place of seq-some.
>
> Why is it more efficient?  The implementations are more or less
> analogue, with the exception that seq-position additionally increments a
> counter.

Because seq-some involves an additional level of function indirection.
This is confirmed by profiling and the attached mini-benchmark, when run
as follows:

emacs -batch -f batch-byte-compile bench.el
emacs -script bench.elc

A call to seq-position is also less verbose than one to seq-some for the
purpose of finding an element of a sequence.

Having said that, the differences are obviously very small.

-- 
Basil