[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
- Re: new function proposal alist-to-hash, (continued)
- Re: new function proposal alist-to-hash, Andrea Corallo, 2019/10/04
- [PATCH] extend map-into (was: new function proposal alist-to-hash), Andrea Corallo, 2019/10/05
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/06
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/06
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/08
- Re: [PATCH] extend map-into,
Andrea Corallo <=
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/08
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/09
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/09
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/09
- Re: [PATCH] extend map-into, Nicolas Petton, 2019/10/10
- Re: [PATCH] extend map-into, Nicolas Petton, 2019/10/10
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/10
- Re: [PATCH] extend map-into, Nicolas Petton, 2019/10/10
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/11
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/11