From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: [PATCH] Add new function to test whether a key is present in a hash table.
Date: Thu, 15 Feb 2018 20:59:12 -0500 [thread overview]
Message-ID: <jwvinaxbsvq.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: eebe25b9-e379-4269-9a9f-78de96e385d7@default
> But isn't it better to define this in C?
To me the answer is usually no, unless it's speed-critical.
Stefan
PS: I think a more interesting function to provide would be some
gethash-ref which would return some kind of "reference" to the entry, so
we can afterwards update that hash-table entry without (re)computing the
hash (i.e. some kind of equivalent to `intern` after which you can just
do `set` which doesn't involve hashing any more). But that would imply
a fairly significant amount of design to make it work.
next prev parent reply other threads:[~2018-02-16 1:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 20:34 [PATCH] Add new function to test whether a key is present in a hash table Philipp Stephani
2018-02-15 22:03 ` Clément Pit-Claudel
2019-04-19 17:33 ` Philipp Stephani
2018-02-15 22:59 ` Stefan Monnier
2018-02-16 1:03 ` Drew Adams
2018-02-16 1:59 ` Stefan Monnier [this message]
2018-02-16 2:50 ` Drew Adams
[not found] <<20180215203406.64372-1-phst@google.com>
2018-02-15 22:08 ` Drew Adams
2018-02-15 23:35 ` Eric Abrahamsen
2018-02-16 6:51 ` John Wiegley
2018-02-18 14:29 ` Richard Copley
2018-02-19 6:02 ` John Wiegley
2018-02-19 17:26 ` Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvinaxbsvq.fsf-monnier+gmane.emacs.devel@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).