Subject: bug#56199: closed (Re: bug#56199: hash table equality predicate [PATCH])

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 25 Jun 2022 16:57:02 +0000

Your bug report

#56199: hash table equality predicate [PATCH]

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
56199: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56199
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#56199: hash table equality predicate [PATCH]
From: Mattias Engdegård <[email-masked]>
To: Lars Ingebrigtsen <[email-masked]>
Cc: [email-masked]
Date: Sat, 25 Jun 2022 18:56:27 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

24 juni 2022 kl. 20.21 skrev Lars Ingebrigtsen <[email-masked]>:

> I can't ever recall wanting to compare two hash tables for equality
> (like, that's not what you use a hash table for)

No, you're right -- it's better to wait until there is a concrete need for it.

Subject: hash table equality predicate [PATCH]
From: Mattias Engdegård <[email-masked]>
To: [email-masked]
Date: Fri, 24 Jun 2022 19:19:54 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Recently[1] a predicate for structural equality was requested that also recurses through hash tables.
It showed that Emacs doesn't even come with a way of comparing hash tables. Third-party implementations exist but if the code quoted in [2] is representative, perhaps it would make sense to add a `hash-table-equal-p` predicate?
Even implemented entirely in Lisp it would be an order of magnitude faster (and actually correct).

The attached code is not without flaws but provides a rough starting point.
(This is not meant as a strong argument for or against adding it in the first place.)

--

[1] https://lists.gnu.org/archive/html/emacs-devel/2022-06/msg00444.html
[2] https://lists.gnu.org/archive/html/emacs-devel/2022-06/msg00553.html