emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Request] seq-map and mapcar with arbitrary number of sequences


From: John Wiegley
Subject: Re: [Request] seq-map and mapcar with arbitrary number of sequences
Date: Sat, 10 Oct 2015 16:24:33 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

>>>>> Artur Malabarba <address@hidden> writes:

> Yes. Supporting this on mapc and mapcar should not incur a performance cost on
> the single seq version. I figured the c code for these functions could just
> check if the &rest argument is nil, and then use the current (single seq)
> implementation. 

> If this single conditional imposes a noticeable overhead we can optimise it
> out with a compiler macro too (I think). 

The main reason I'd like it to be zero cost is that, once the change is made,
there will be zero users of it. All existing code uses a single list, and it
will be some time before authors feel confident enough in breaking backwards
compatibility to start using multiple lists. So for a few years, at least,
there will be no benefit except the knowledge that consistency has been
improved. The gain is too small for it to be worth a real cost.

John



reply via email to

[Prev in Thread] Current Thread [Next in Thread]