emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] extend map-into


From: Stefan Monnier
Subject: Re: [PATCH] extend map-into
Date: Tue, 08 Oct 2019 16:23:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> 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.

That sounds about right.  Tho, you can also use something like
`benchmark` for that.

> 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.

0.03 seconds is too small for a meaningful measure, in my experience,
I recommend you add 2 zeroes to the number of iterations to bring it
into the realm of "a few seconds".

But, yes, there's a chance the difference is negligible (more time is
spent in the funcall/apply machinery itself and/or the hash lookup than
the specific computation of the "tag" used to index the hash-table,
which is the part that depends on the set of specializers used on
a particular argument of a generic function).


        Stefan




reply via email to

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