Subject: Re: bug#78474: 31.0.50; Wrong char insertion in rxvt

From: Manuel Giraud <[email-masked]>
Date: Fri, 25 Jul 2025 13:08:07 +0200

Samuel Thibault <[email-masked]> writes:

[...]

>> Here are my results with this new benchmark:
>
> (Several measurements are really needed because of variability)

Why not.  So, here is the benchmark code I used:
--8<---------------cut here---------------start------------->8---
(defun move-right-in-big-file (iteration)
  (let ((oldgc gcs-done)
        (oldtime (float-time)))
    (goto-char (point-min))
    (condition-case nil
        (while t (right-char 5) (right-char) (redisplay))
      (error (message "%d) GCs: %d Elapsed time: %f seconds"
		      iteration
                      (- gcs-done oldgc) (- (float-time) oldtime)))))

(defun do-run-bench ()
  (interactive)
  (find-file "/tmp/testfile")
  (with-current-buffer "testfile"
    (dotimes (i 5)
      (move-right-in-big-file i))))
--8<---------------cut here---------------end--------------->8---

The file "/tmp/testfile" is 40k lines of 01234567cbaaaaaa (one on each
line).  Here are the new results:
--8<---------------cut here---------------start------------->8---
* master (e026b57f077)
** xterm -geometry 80x50
0) GCs: 116 Elapsed time: 63.792068 seconds
1) GCs: 116 Elapsed time: 71.622749 seconds
2) GCs: 115 Elapsed time: 71.081707 seconds
3) GCs: 115 Elapsed time: 71.586609 seconds
4) GCs: 116 Elapsed time: 71.637533 seconds

** vte --geometry=80x50
0) GCs: 116 Elapsed time: 59.622406 seconds
1) GCs: 115 Elapsed time: 64.886754 seconds
2) GCs: 116 Elapsed time: 64.992959 seconds
3) GCs: 115 Elapsed time: 68.607110 seconds
4) GCs: 115 Elapsed time: 68.618530 seconds

** alacritty -o "window.dimensions.columns=80" -o "window.dimensions.lines=50"
0) GCs: 117 Elapsed time: 62.261371 seconds
1) GCs: 115 Elapsed time: 78.729518 seconds
2) GCs: 115 Elapsed time: 71.705638 seconds
3) GCs: 115 Elapsed time: 72.297152 seconds
4) GCs: 116 Elapsed time: 70.714234 seconds

** OpenBSD console (120x33)
0) GCs: 117 Elapsed time: 52.839892 seconds
1) GCs: 115 Elapsed time: 75.330218 seconds
2) GCs: 115 Elapsed time: 70.088152 seconds
3) GCs: 116 Elapsed time: 72.875108 seconds
4) GCs: 115 Elapsed time: 77.073560 seconds

* no "\t\b" patch
** xterm -geometry 80x50
0) GCs: 117 Elapsed time: 63.044708 seconds
1) GCs: 115 Elapsed time: 71.653735 seconds
2) GCs: 115 Elapsed time: 71.419002 seconds
3) GCs: 116 Elapsed time: 71.365777 seconds
4) GCs: 115 Elapsed time: 71.368108 seconds

** vte --geometry=80x50
0) GCs: 115 Elapsed time: 54.472031 seconds
1) GCs: 116 Elapsed time: 61.845512 seconds
2) GCs: 115 Elapsed time: 61.784741 seconds
3) GCs: 115 Elapsed time: 61.765834 seconds
4) GCs: 115 Elapsed time: 61.864283 seconds

** alacritty -o "window.dimensions.columns=80" -o "window.dimensions.lines=50"
0) GCs: 116 Elapsed time: 60.468120 seconds
1) GCs: 115 Elapsed time: 68.995329 seconds
2) GCs: 115 Elapsed time: 69.065036 seconds
3) GCs: 116 Elapsed time: 69.261622 seconds
4) GCs: 115 Elapsed time: 68.021610 seconds

** OpenBSD console (120x33)
0) GCs: 117 Elapsed time: 57.670531 seconds
1) GCs: 115 Elapsed time: 58.239377 seconds
2) GCs: 116 Elapsed time: 60.935976 seconds
3) GCs: 115 Elapsed time: 67.796118 seconds
4) GCs: 115 Elapsed time: 74.120420 seconds
--8<---------------cut here---------------end--------------->8---

-- 
Manuel Giraud