GNU bug report logs - #56199
hash table equality predicate [PATCH]

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Fri, 24 Jun 2022 17:21:02 UTC

Severity: normal

Tags: patch

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#56199: closed (hash table equality predicate [PATCH])
Date: Sat, 25 Jun 2022 16:57:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 25 Jun 2022 18:56:27 +0200
with message-id <2AD517D9-A9BC-44E2-A3DB-51AD84D29540 <at> acm.org>
and subject line Re: bug#56199: hash table equality predicate [PATCH]
has caused the debbugs.gnu.org bug report #56199,
regarding hash table equality predicate [PATCH]
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
56199: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56199
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mattias Engdegård <mattiase <at> acm.org>
To: bug-gnu-emacs <at> gnu.org
Subject: hash table equality predicate [PATCH]
Date: Fri, 24 Jun 2022 19:19:54 +0200
[Message part 3 (text/plain, inline)]
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.)

[hash-table-equal-p.diff (application/octet-stream, attachment)]
[Message part 5 (text/plain, inline)]

--

[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

[Message part 6 (message/rfc822, inline)]
From: Mattias Engdegård <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56199-done <at> debbugs.gnu.org
Subject: Re: bug#56199: hash table equality predicate [PATCH]
Date: Sat, 25 Jun 2022 18:56:27 +0200
24 juni 2022 kl. 20.21 skrev Lars Ingebrigtsen <larsi <at> gnus.org>:

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



This bug report was last modified 2 years and 326 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.