GNU bug report logs -
#77924
31.0.50; [Feature branch] Change marker implementation
Previous Next
Full log
View this message in rfc822 format
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> As discussed in the other thread, this performs fairly few
> charpos->bytepos conversions, actually. Instead it spends most of its
> time inside the `diffseq.h` code. You could try something like:
>
> (require 'subr-x)
>
> (defun elb-replace-region-contents-entry ()
> (with-temp-buffer
> (let ((step (apply #'concat (make-list 2000 "🙂été👶🏿 "))))
> (dotimes (_ (/ 500000 (length step)))
> (insert step))
>
> (dotimes (_ 100000)
> (let* ((a (+ (point-min) (random (buffer-size))))
> (b (min (+ a (length step) (random 512) -256) (point-max))))
> (replace-region-contents a b (lambda () step)))))))
>
> which should spend more time in Emacs's code (especially in
> `buffer_chars_equal`) than in `diffseq.h`
Tried to run that on my mini, but it didn't finish in ca. 2h. So I tried
to call that function on my MB, and had to kill my Emacs :-).
Anyway, the other benchmarks showed an improvement over master, so I'm
content.
This bug report was last modified 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.