Visuwesh writes: > [வியாழன் ஏப்ரல் 24, 2025] Gerd Möllmann wrote: > >>> Is there a standard benchmark code that I can try for this? I have such >>> a large HTML file with Tamil text, and I can scroll through the buffer >>> produced by shr-render-buffer. >> >> The elisp-benchmarks package has an elb-scroll.el, in its benchmarks >> directory. AFAICT, that loads an xmenu.c from the resources >> sub-directory of the benchmarks. >> >> You could copy that, or modify it. >> >> P.S. >> >> One can set the benchmarks directory to somewhere else, and run >> benchmarks like this: >> >> (setq elb-bench-directory "~/emacs/notes/code/benchmarks") >> (elisp-benchmarks-run ".*replace-region-contents.*" t 100) >> >> The 100 is the number of runs, which should be chosen high enough that >> the "err" column in the result buffer is reasonably low. I'd start with >> 1 to see how long that takes, and then increase it. > > I ran the benchmark with the text file tamil.txt in place of xmenu.c, > but I didn't disable elb-smie-mode since I ran into weird issues. In > both master and text-index cases, I ran the benchmark with > > % emacs -Q -l elisp-benchmarks-run --eval '(elisp-benchmarks-run "elb-scroll" t 10)' > > and here are the results for the master branch: > > * Results > > | test | non-gc (s) | gc (s) | gcs | total (s) | err | > |--------+------------+--------+-----+-----------+-----| > | scroll | 155.73 | 49.29 | 835 | 205.02 | 0% | > |--------+------------+--------+-----+-----------+-----| > | total | 155.73 | 49.29 | 835 | 205.02 | 0% | > > and for the scratch/text-index branch: > > * Results > > | test | non-gc (s) | gc (s) | gcs | total (s) | err | > |--------+------------+--------+-----+-----------+-----| > | scroll | 171.89 | 51.56 | 869 | 223.44 | 1% | > |--------+------------+--------+-----+-----------+-----| > | total | 171.89 | 51.56 | 869 | 223.44 | 1% | > > Unfortunately, my laptop went to power saving mode during the last two > minutes or so for the scratch/text-index benchmark run so that might > play into the numbers a tiny bit. I can try repeating the test later > for the latter case if desired. Empirically speaking, both branches > seemed to scroll at the same speed. > > This is how I configured both Emacses: > > % ./configure --with-sound=alsa --with-x-toolkit=motif \ > --without-xaw3d --without-gconf --without-libsystemd \ > --with-cairo CFLAGS=-g3 CC=$(which gcc-13) > > If anyone wants to repeat the test, I attach the text file (compressed) > I use here. Same on Mac mini M1, idle, tamil.txt but without the elb-smie-mode, 10 runs. * master Results | test | non-gc (s) | gc (s) | gcs | total (s) | err (s) | |--------+------------+--------+------+-----------+---------| | scroll | 23.48 | 12.00 | 1271 | 35.48 | 0.23 | |--------+------------+--------+------+-----------+---------| | total | 23.48 | 12.00 | 1271 | 35.48 | 0.23 | * text-index Results | test | non-gc (s) | gc (s) | gcs | total (s) | err (s) | |--------+------------+--------+------+-----------+---------| | scroll | 23.03 | 12.06 | 1271 | 35.09 | 0.15 | |--------+------------+--------+------+-----------+---------| | total | 23.03 | 12.06 | 1271 | 35.09 | 0.15 | Config