all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA>
Subject: Markers/intervals/overlays + trees
Date: Thu, 09 Aug 2012 07:53:48 +0400	[thread overview]
Message-ID: <5023344C.6020603@yandex.ru> (raw)
In-Reply-To: <83vcgtdsg9.fsf@gnu.org>

On 08/09/2012 12:44 AM, Eli Zaretskii wrote:
>> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
>> Date: Wed, 08 Aug 2012 15:47:58 -0400
>> Cc: dmantipov@yandex.ru, emacs-devel@gnu.org
>>
>>> FWIW, the display engine uses this division quite a lot.  If we end up
>>> removing it, I suggest to time the code with and without it, e.g. by
>>> timing some modes that are heavy users of overlays.
>>
>> I don't think we need timings.
>
> Not if we aren't getting rid of overlay-recenter, we don't ;-)

The more I do different things around buffers and markers/intervals/overlays,
the more I think that the last three ones represents nearly the same thing,
i.e. "buffer range with properties" (marker is the range of length 0 (or 1,
that's may be the question), and without properties). Is it reasonable/
possible/feasible to generalize them into the only type and use it everywhere?

If not, shouldn't markers and overlays be chained into double-linked lists
instead of single-linked, for the sake of fast unchain/re-chain and in-place sort?

Finally, what about an idea to generalize red-black tree from alloc.c and
use it everywhere when O(log(n)) data structure is needed? I suppose that we
can even avoid our own tree implementation while compiling for GNU/Linux because
glibc trees (tsearch/tfind/etc.) are balanced and good enough in general.

Dmitry




  reply	other threads:[~2012-08-09  3:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1Sz80a-0000RM-Qp@vcs.savannah.gnu.org>
2012-08-08 15:45 ` [Emacs-diffs] /srv/bzr/emacs/trunk r109512: Inline functions to examine and change buffer overlays Stefan Monnier
2012-08-08 16:26   ` Dmitry Antipov
2012-08-08 18:05     ` Stefan Monnier
2012-08-08 18:16       ` Eli Zaretskii
2012-08-08 19:47         ` Stefan Monnier
2012-08-08 20:44           ` Eli Zaretskii
2012-08-09  3:53             ` Dmitry Antipov [this message]
2012-08-09 16:15               ` Markers/intervals/overlays + trees Eli Zaretskii
2012-08-09 17:16               ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5023344C.6020603@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.