Subject: bug#77924: 31.0.50; [Feature branch] Change marker implementation

From: Eli Zaretskii <[email-masked]>
Date: Thu, 24 Apr 2025 10:50:50 +0300

> From: Gerd Möllmann <[email-masked]>
> Cc: Stefan Monnier <[email-masked]>,  [email-masked],
>   [email-masked],  [email-masked]
> Date: Thu, 24 Apr 2025 07:42:21 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Still, for performance-oriented changes, it would be nice to see some
> > benchmarks.  Scrolling through some large file with many non-ASCII
> > characters comes to mind (the Unicode UCD has quite a few of such
> > files).
> >
> > Also, I believe there were cases where a lot of conversions
> > created gobs of markers which slowed down things; it would be good to
> > run those cases to see how they are affected.
> >
> > And finally, how about running the whole benchmark suite we have, in
> > case it uncovers some unexpected results?
> 
> I can offer to run benchmarks on my Mac mini.

Should be fine, I think.  I very much doubt that there will be
significant differences between platforms for this kind of changes.

> But we should agree upon what elisp-benchmark files I should use and on
> the number of runs, because running them takes an eternity, and because
> some of the benchmarks Stef (and me for elb-search) ran are not in the
> "official" elisp-benchmarks package.

I trust you and Stefan to decide on that.  I myself am not familiar
with the elisp-benchmarks suite well enough to have an opinion that is
of importance.  From where I stand, the important part is comparing
the current master with the branch.

> Don't know about the scrolling benchmark. Is what is in elisp-benchmarks
> enough? If not, can you please give me a bencnhmark file for what you
> want benchmarked?

I don't know whether we have it in elisp-benchmarks, but if we don't,
then the following should be good enough:

(defun scroll-up-benchmark ()
  (interactive)
  (let ((oldgc gcs-done)
        (oldtime (float-time)))
    (condition-case nil (while t (scroll-up) (redisplay))
      (error (message "GCs: %d Elapsed time: %f seconds"
                      (- gcs-done oldgc) (- (float-time) oldtime))))))

Evaluate this, then invoke "M-x scroll-up-benchmark" in a large buffer
with lots of non-ASCII characters.  Compare the timings between the
two versions of Emacs.

Thanks.