[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs design and architecture. How about copy-on-write?

From: Eli Zaretskii
Subject: Re: Emacs design and architecture. How about copy-on-write?
Date: Fri, 22 Sep 2023 16:01:33 +0300

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: dmitry@gutov.dev, acm@muc.de, incal@dataswamp.org, emacs-devel@gnu.org
> Date: Fri, 22 Sep 2023 15:49:21 +0300
> > Feel free to present such a more efficient algorithm, and thanks.
> > And I'm not sure I understand why you think that
> >
> >   min (mapcar (Fnext_single_property_change, it_props))
> >
> > will be cheaper than the current algorithm in compute_stop_pos, since
> > Fnext_single_property_change basically examines the same intervals
> > again and again for each property in it_props.
> The algorithm I have in mind is to change interval tree to store several
> trees together - a common tree storing segments delimited by _a_
> property change + a tree for individual properties. That way, looking up
> for next single property change will be a simple call to next_interval for
> the property itself + property aliases.

Feel free to implement that and benchmark it against the current
implementation.  If it's significantly faster, I';m sure we will
accept the changes.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]