GNU bug report logs - #68244
hash-table improvements

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Date: Thu, 4 Jan 2024 16:29:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: João Távora <joaotavora <at> gmail.com>
Cc: Mattias Engdegård <mattias.engdegard <at> gmail.com>, 68244 <at> debbugs.gnu.org
Subject: bug#68244: hash-table improvements
Date: Sun, 21 Jan 2024 14:03:47 +0100
[Message part 1 (text/plain, inline)]
Mattias Engdegård [2024-01-04 17:27 +0100] wrote:

> It's the hash-table's turn to be subjected to some performance tuning.

Thanks!

> The implementation has changed very little over the years and it's not
> so much a matter of a single big thing to fix as many small ones, so
> the list of changes is fairly long but ever little helps.

João, is this tiny additional straw okay for the camel's back?

[0001-Further-shrink-eglot.patch (text/x-diff, inline)]
From 359e5d5b90754373ff8a2db6431421d7838c113b Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Fri, 19 Jan 2024 13:50:29 +0100
Subject: [PATCH] Further shrink eglot--{}

Up to and including Emacs 29, :size 0 was an alias for :size 1.
Emacs 30 gained support for :size 0 hash tables (bug#68244).

* lisp/progmodes/eglot.el (eglot--{}): Define as truly zero-sized.
---
 lisp/progmodes/eglot.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index c5cfdd3cedd..511000927cf 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -575,7 +575,7 @@ eglot--tag-faces
 
 (defvaralias 'eglot-{} 'eglot--{})
 
-(defconst eglot--{} (make-hash-table :size 1) "The empty JSON object.")
+(defconst eglot--{} (make-hash-table :size 0) "The empty JSON object.")
 
 (defun eglot--executable-find (command &optional remote)
   "Like Emacs 27's `executable-find', ignore REMOTE on Emacs 26."
-- 
2.43.0

[Message part 3 (text/plain, inline)]
-- 
Basil

This bug report was last modified 1 year and 146 days ago.

Previous Next


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