emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] extend map-into


From: Andrea Corallo
Subject: Re: [PATCH] extend map-into
Date: Tue, 08 Oct 2019 18:46:06 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix)

Stefan Monnier <address@hidden> writes:

>>> I guess we could use a `type` that's not a symbol but a list (whose
>>> head is a symbol and the rest are the args), but it could be a bit
>>> inconvenient (and would impact efficiency as well because it makes the
>>> cl-generic dispatch more complex).
>> Cool, is the attached patch doing what you suggest?
>
> Yes.  Have you taken a look at the performance impact?
> E.g. how much slower does something like (map-into nil 'alist) becomes
> (this should be pretty the worst case which spends most/all its time in
> the dispatch)?

I can tell you what I did just now and you tell me if it makes sense.
I've created a function with as body an unrolled loop that calls 10000
times (map-into nil 'alist).
Once byte compiled I've run it with the current map.el and then with the
new one loaded.
On my machine both versions runs in about the same time (~0.04-0.03
secs), if there's some difference for this simple test is just noise.

Interesting, I would bet on funcall as responsible but I admit I don't
know how the dynamic dispatch is implemented in details.

> Nicolas, WDYT?
>
>
>         Stefan

Bests
  Andrea

-- 
address@hidden



reply via email to

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