From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.devel Subject: Re: Overlays as an AA-tree Date: Wed, 03 May 2017 21:20:09 +0200 Message-ID: <877f1xu4ra.fsf@luca> References: <87d1jylv43.fsf@fastmail.com> <877f53ftab.fsf@hochschule-trier.de> <878tpiqiuc.fsf@hochschule-trier.de> <87shnppspb.fsf@hochschule-trier.de> <87o9yc9v30.fsf@hochschule-trier.de> <87a89vaes3.fsf@hochschule-trier.de> <87efz7n0g5.fsf@fastmail.com> <877f4uah6i.fsf@hochschule-trier.de> <83k28u1uyz.fsf@gnu.org> <871suxs9ad.fsf@hochschule-trier.de> <837f4pxpdc.fsf@gnu.org> <877f4lls9e.fsf@hochschule-trier.de> <838tp0q3k8.fsf@gnu.org> <87vas4owus.fsf@luca> <87r32rpfhv.fsf@luca> <87vas07zdn.fsf@luca> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493839281 25473 195.159.176.226 (3 May 2017 19:21:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 May 2017 19:21:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 03 21:21:14 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5zpm-0006Gr-QH for ged-emacs-devel@m.gmane.org; Wed, 03 May 2017 21:21:10 +0200 Original-Received: from localhost ([::1]:38315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5zpn-0003sR-16 for ged-emacs-devel@m.gmane.org; Wed, 03 May 2017 15:21:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5zpG-0003sB-MH for emacs-devel@gnu.org; Wed, 03 May 2017 15:20:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5zpB-0006d1-Am for emacs-devel@gnu.org; Wed, 03 May 2017 15:20:38 -0400 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:54953) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d5zpB-0006aU-0n for emacs-devel@gnu.org; Wed, 03 May 2017 15:20:33 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier (RZ/HT)] Original-Received: from localhost (ip5f5bdedd.dynamic.kabel-deutschland.de [95.91.222.221]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 23307179C953; Wed, 3 May 2017 21:20:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1493839210; bh=x++M48cwR5vAtpRWksWy1PgwUD4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=bqtltNpVDDVH140gkS3UiPdLrCfsKki/aU8DyiSl8PCzWSYyVFO6oUuDz2Lp7J8lJ JswX0B4Z0cTjQkV5wBC/WPs3lXlQ4AuPAog2VH1cHx7XJkHzfl1Ufkeudf33S7GlzT cZkiT6rE7RCcRI+uNk/39EAqsj4+rUYPz2J/G4hs= In-Reply-To: (=?utf-8?Q?=22Cl=C3=A9ment?= Pit-Claudel"'s message of "Sat, 8 Apr 2017 09:28:18 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 143.93.54.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214549 Archived-At: I stopped working on this, since it wasn't clear where this will be going (among other things). But I'm willing to pick it up again. Following is a fairly concise status-report. I'm running this branch for some time now, so I'm confident that there are no obvious hard bugs, by which I mean bugs which would terminate Emacs. Even though, there is at least one of those which I haven't being able to track down yet. It occurs in a fairly complex situation (using customize). Probably due to a combination of narrowing and modifying the buffer, because this is not very well tested. The branch contains about 300 Lisp- and about 50 C-level test-cases. I am frequently merging master into it, while pushing to https://github.com/politza/emacs-noverlay. The memory allocation in some functions is dynamic, which could be made static, I assume. Also, quitting may be a problem in these cases. I think it would be advantageous to represent overlays with identical start values as a single node by utilizing a linked list. This would improve performance in some degenerate cases (from a tree's perspective), by combining the best aspects of the (current) list and tree approaches. We also talked about using the same data-structure for marker, but there is no work done in this direction currently. -ap