[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: State of the overlay tree branch?
From: |
Sebastian Sturm |
Subject: |
Re: State of the overlay tree branch? |
Date: |
Fri, 23 Mar 2018 00:11:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 03/22/2018 09:52 PM, Stefan Monnier wrote:
(defun benchmark-often ()
(cl-loop for n from 1 upto 20 do
(message (format "iteration %d: %f" n (nth 0 (benchmark-run
(line-number-at-pos (point))))))))
^^^^^^^
Where is this "point" in your tests (I expect the timing to vary
significantly depending on this).
yes, these tests were all performed close to the very bottom of the file
as I knew the issue to get worse towards the buffer end
My crystal ball tells me that DeclBase.h is pure ASCII so byte<->char
conversion is trivial, whereas your file likely contains umlauts and
other disreputable characters.
Here's a similar test case to yours but which builds up its own
artificial buffer with a few non-ascii chars to spice things up:
thank you! I'm very glad you could come up with a reproducible test
case, and it's true that my file contains two instances of the greek
letter "μ" that seem to cause this performance issue (though I was
surprised to see that this few characters could have such a poisonous
effect). Likewise, when replacing the topmost part in your benchmark
function with the following:
(A) (dotimes (i 1000)
(insert "pure ascii pure ascii pure ascii\n"))
(B) (dotimes (i 500)
(insert "pure ascii pure ascii pure ascii\n"))
(insert "μ")
(dotimes (i 500)
(insert "pure ascii pure ascii pure ascii\n"))
respectively, I obtain the following timing results:
(A)
ols=3300 pos=0/4 time=0.0014 (+ (0 0.0))
ols=3300 pos=1/4 time=0.0155 (+ (0 0.0))
ols=3300 pos=2/4 time=0.0281 (+ (0 0.0))
ols=3300 pos=3/4 time=0.0447 (+ (0 0.0))
ols=206 pos=0/4 time=0.0007 (+ (0 0.0))
ols=206 pos=1/4 time=0.0130 (+ (0 0.0))
ols=206 pos=2/4 time=0.0283 (+ (0 0.0))
ols=206 pos=3/4 time=0.0447 (+ (0 0.0))
ols=12 pos=0/4 time=0.0007 (+ (0 0.0))
ols=12 pos=1/4 time=0.0129 (+ (0 0.0))
ols=12 pos=2/4 time=0.0281 (+ (0 0.0))
ols=12 pos=3/4 time=0.0447 (+ (0 0.0))
ols=0 pos=0/4 time=0.0007 (+ (0 0.0))
ols=0 pos=1/4 time=0.0134 (+ (0 0.0))
ols=0 pos=2/4 time=0.0297 (+ (0 0.0))
ols=0 pos=3/4 time=0.0463 (+ (0 0.0))
(B)
ols=3300 pos=0/4 time=0.0007 (+ (0 0.0))
ols=3300 pos=1/4 time=0.0301 (+ (0 0.0))
ols=3300 pos=2/4 time=0.0482 (+ (0 0.0))
ols=3300 pos=3/4 time=8.0213 (+ (0 0.0))
ols=206 pos=0/4 time=0.0007 (+ (0 0.0))
ols=206 pos=1/4 time=0.0141 (+ (0 0.0))
ols=206 pos=2/4 time=0.0325 (+ (0 0.0))
ols=206 pos=3/4 time=0.1786 (+ (0 0.0))
ols=12 pos=0/4 time=0.0007 (+ (0 0.0))
ols=12 pos=1/4 time=0.0136 (+ (0 0.0))
ols=12 pos=2/4 time=0.0323 (+ (0 0.0))
ols=12 pos=3/4 time=0.0794 (+ (0 0.0))
ols=0 pos=0/4 time=0.0009 (+ (0 0.0))
ols=0 pos=1/4 time=0.0139 (+ (0 0.0))
ols=0 pos=2/4 time=0.0326 (+ (0 0.0))
ols=0 pos=3/4 time=0.0632 (+ (0 0.0))
by comparison, these are my results using the noverlay branch:
(A)
ols=3300 pos=0/4 time=0.0012 (+ (0 0.0))
ols=3300 pos=1/4 time=0.0132 (+ (0 0.0))
ols=3300 pos=2/4 time=0.0291 (+ (0 0.0))
ols=3300 pos=3/4 time=0.0448 (+ (0 0.0))
ols=206 pos=0/4 time=0.0007 (+ (0 0.0))
ols=206 pos=1/4 time=0.0132 (+ (0 0.0))
ols=206 pos=2/4 time=0.0290 (+ (0 0.0))
ols=206 pos=3/4 time=0.0454 (+ (0 0.0))
ols=12 pos=0/4 time=0.0008 (+ (0 0.0))
ols=12 pos=1/4 time=0.0131 (+ (0 0.0))
ols=12 pos=2/4 time=0.0287 (+ (0 0.0))
ols=12 pos=3/4 time=0.0452 (+ (0 0.0))
ols=0 pos=0/4 time=0.0007 (+ (0 0.0))
ols=0 pos=1/4 time=0.0131 (+ (0 0.0))
ols=0 pos=2/4 time=0.0289 (+ (0 0.0))
ols=0 pos=3/4 time=0.0457 (+ (0 0.0))
(B)
ols=3300 pos=0/4 time=0.0015 (+ (0 0.0))
ols=3300 pos=1/4 time=0.0177 (+ (0 0.0))
ols=3300 pos=2/4 time=0.0345 (+ (0 0.0))
ols=3300 pos=3/4 time=0.0544 (+ (0 0.0))
ols=206 pos=0/4 time=0.0008 (+ (0 0.0))
ols=206 pos=1/4 time=0.0136 (+ (0 0.0))
ols=206 pos=2/4 time=0.0317 (+ (0 0.0))
ols=206 pos=3/4 time=0.0537 (+ (0 0.0))
ols=12 pos=0/4 time=0.0007 (+ (0 0.0))
ols=12 pos=1/4 time=0.0135 (+ (0 0.0))
ols=12 pos=2/4 time=0.0319 (+ (0 0.0))
ols=12 pos=3/4 time=0.0537 (+ (0 0.0))
ols=0 pos=0/4 time=0.0007 (+ (0 0.0))
ols=0 pos=1/4 time=0.0146 (+ (0 0.0))
ols=0 pos=2/4 time=0.0318 (+ (0 0.0))
ols=0 pos=3/4 time=0.0554 (+ (0 0.0))
since noverlay performs so well, I guess the technical issue here is
already solved and I'll just have to wait for it to make it into the
master branch. Until then I'll continue using feature/noverlay, but if a
more recent merge with master was made available, I'd be interested in
testing that.
thanks again for all the helpful responses in this thread,
Sebastian
- Re: State of the overlay tree branch?, (continued)
- Re: State of the overlay tree branch?, Sebastian Sturm, 2018/03/19
- Re: State of the overlay tree branch?, Stefan Monnier, 2018/03/19
- Re: State of the overlay tree branch?, Sebastian Sturm, 2018/03/19
- Re: State of the overlay tree branch?, Eli Zaretskii, 2018/03/20
- Re: State of the overlay tree branch?, Sebastian Sturm, 2018/03/20
- Re: State of the overlay tree branch?, Eli Zaretskii, 2018/03/21
- Re: State of the overlay tree branch?, Stefan Monnier, 2018/03/22
- Re: State of the overlay tree branch?, Sebastian Sturm, 2018/03/22
- Re: State of the overlay tree branch?, Sebastian Sturm, 2018/03/22
- Re: State of the overlay tree branch?, Stefan Monnier, 2018/03/22
- Re: State of the overlay tree branch?,
Sebastian Sturm <=
- Re: State of the overlay tree branch?, Stefan Monnier, 2018/03/23
- Re: State of the overlay tree branch?, Sebastian Sturm, 2018/03/23
- Re: State of the overlay tree branch?, Eli Zaretskii, 2018/03/23
- Re: State of the overlay tree branch?, Stefan Monnier, 2018/03/23
- Re: State of the overlay tree branch?, Noam Postavsky, 2018/03/23
- Re: State of the overlay tree branch?, Stefan Monnier, 2018/03/23
- Re: State of the overlay tree branch?, Eli Zaretskii, 2018/03/23
- Re: State of the overlay tree branch?, Stefan Monnier, 2018/03/23
- Re: State of the overlay tree branch?, Stefan Monnier, 2018/03/23
- Re: State of the overlay tree branch?, Stefan Monnier, 2018/03/25