From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Andrea Corallo <akrl@sdf.org>
Cc: Nicolas Petton <nicolas@petton.fr>, emacs-devel@gnu.org
Subject: Re: [PATCH] extend map-into
Date: Tue, 08 Oct 2019 16:23:33 -0400 [thread overview]
Message-ID: <jwv36g3xaam.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <xjf36g3jcsx.fsf@sdf.org> (Andrea Corallo's message of "Tue, 08 Oct 2019 18:46:06 +0000")
> 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
next prev parent reply other threads:[~2019-10-08 20:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-04 9:58 new function proposal alist-to-hash Andrea Corallo
2019-10-04 19:16 ` Stefan Monnier
2019-10-05 8:18 ` Andrea Corallo
2019-10-05 15:13 ` Stefan Monnier
2019-10-05 15:45 ` Andrea Corallo
2019-10-05 8:28 ` [PATCH] extend map-into (was: new function proposal alist-to-hash) Andrea Corallo
2019-10-06 14:02 ` [PATCH] extend map-into Stefan Monnier
2019-10-06 20:59 ` Andrea Corallo
2019-10-08 17:29 ` Stefan Monnier
2019-10-08 18:46 ` Andrea Corallo
2019-10-08 20:23 ` Stefan Monnier [this message]
2019-10-09 15:35 ` Andrea Corallo
2019-10-09 19:41 ` Stefan Monnier
2019-10-09 20:02 ` Andrea Corallo
2019-10-10 8:27 ` Nicolas Petton
2019-10-10 8:28 ` Nicolas Petton
2019-10-10 10:06 ` Andrea Corallo
2019-10-10 11:47 ` Nicolas Petton
2019-10-11 16:19 ` Stefan Monnier
2019-10-11 16:29 ` Andrea Corallo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv36g3xaam.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=akrl@sdf.org \
--cc=emacs-devel@gnu.org \
--cc=nicolas@petton.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.