Subject: bug#70036: a fix that

From: João Távora <[email-masked]>
Date: Thu, 18 Apr 2024 18:27:39 +0100

On Thu, Apr 18, 2024 at 5:24 PM Eli Zaretskii <[email-masked]> wrote:

> If you timed this code with the likes of benchmark-run, please show
> the timings.  Profiles are not the best instrument for this kind of
> decisions.

I disagree completely, but whatever.  It's microbenchmarks that are
useless, because they don't have any context.  But if you want
some of these, here you go.  I benchmarked eglot--TextDocumentIdentifier
because that's the only reasonable thing I could gather from the
profile.

;; before Theodor's patch
(benchmark-run 10000 (eglot--TextDocumentIdentifier)) ;; (1.716975213
21 0.8623904230000008)
;; after Theodor's patch
(benchmark-run 10000 (eglot--TextDocumentIdentifier)) ;; (0.651663934
11 0.46295383499999687)
;; after I reverted Theodor's patch and added my patch
(benchmark-run 10000 (eglot--TextDocumentIdentifier)) ;; (0.000280462
0 0.0) yes, this is just reading a cached variable.

João