[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MPS: dangling markers
From: |
Gerd Möllmann |
Subject: |
Re: MPS: dangling markers |
Date: |
Sat, 29 Jun 2024 16:56:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Ihor Radchenko <yantar92@posteo.net> writes:
> I did a small perf benchmark generating large agendas multiple times,
> and got the following output:
>
> 36.34% emacs emacs [.]
> igc_remove_marker
> 35.77% emacs emacs [.]
> igc_add_marker
> 3.41% emacs emacs [.]
> buf_charpos_to_bytepos
> 2.12% emacs emacs [.]
> re_search_2
> 1.60% emacs emacs [.]
> re_match_2_internal
> 1.13% emacs emacs [.]
> exec_byte_code
> 0.95% emacs emacs [.]
> buf_bytepos_to_charpos
>
> I guess O(N) is not all the fast, after all :)
Thanks for testing it, and yeah O(n) isn't that great. Bad is that I
have no idea how to improve that ATM :-/.
Problem is that weak entries can be set to nil, concurrently, while we
are traversing the vector. So, compacting the vector while detecting
dead markers in not an option because that would confuse the iteration.
Easy and clean but expensive would be to make a copy and iterate over
the copy. Especially expensive when we have many markers.
Easy and probably also expensive (unknown) is to stop GCing while
iterating.
Hm, hm, hm.
> (assoc-string "PVEC_MARKER" (igc-info)) gives ~200-600k markers with my setup.
M-x igc-stats RET since yesterday, I believe :-)
How many live and dead?
- Re: MPS: dangling markers, (continued)
- Re: MPS: dangling markers, Stefan Monnier, 2024/06/27
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/28
- Re: MPS: dangling markers, Ihor Radchenko, 2024/06/28
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/28
- Re: MPS: dangling markers, Ihor Radchenko, 2024/06/28
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/28
- Re: MPS: dangling markers, Ihor Radchenko, 2024/06/28
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/28
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/28
- Re: MPS: dangling markers, Ihor Radchenko, 2024/06/29
- Re: MPS: dangling markers,
Gerd Möllmann <=
- Re: MPS: dangling markers, Eli Zaretskii, 2024/06/29
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/29
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/29
- Re: MPS: dangling markers, Eli Zaretskii, 2024/06/29
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/29
- Re: MPS: dangling markers, Eli Zaretskii, 2024/06/29
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/29
- Re: MPS: dangling markers, Ihor Radchenko, 2024/06/29
- Re: MPS: dangling markers, Gerd Möllmann, 2024/06/29
- Re: MPS: dangling markers, Stefan Monnier, 2024/06/29