emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add new function to test whether a key is present in a hash


From: Stefan Monnier
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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




reply via email to

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