🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3687

Re: GNU Emacs, memory usage, releasing

#3687
From: rdh
Date: Wed, 03 Jan 1990 20:52
20 lines
1668 bytes
In article <129799@sun.Eng.Sun.COM> jpayne%flam@Sun.COM (Jonathan Payne) writes:

	   o Regular expression search is MUCH cleaner.  I ripped the code
	     out of JOVE and converted it to buffer gap, and it's fast and
	     much smaller, and definitely much easier to understand, and is
	     more functional (it searches across newline bounderies).

Just as an aside, a fast search algorithm dependant on contiguous buffer
(a gap is a special [degenerate] case of a contiguous buffer) can match
reasonable search strings with an average of less than one machine in-
struction per character searched (for an average PDP-10/68K/x86 class of
machine, anyways). With a linked list buffer scheme, I suspect that the
best one could hope for is an order of magnitude worse. I personally do
*MANY* more searches than I do gap-moving operations...

					-RDH
P.S.	By "reasonable search strings", I mean at least 4 distinct char-
	acters, typically 6 or 8. For example, "read", "write", "(arg1,"
	are all "typical, reasonable" search strings that search very
	fast, whereas "a" or "zzzzz" would not search nearly as fast.
Technical Details
Message-ID: <RDH.90Jan3154814@borodin.sli.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!sli!news
References: <1558@aber-cs.UUCP> <129799@sun.Eng.Sun.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!sli!news
From: rdh@sli.com
Newsgroups: comp.editors,gnu.emacs,comp.unix.wizards
Subject: Re: GNU Emacs, memory usage, releasing
Message-ID: <RDH.90Jan3154814@borodin.sli.com>
Date: 3 Jan 90 20:52:25 GMT
References: <1558@aber-cs.UUCP> <129799@sun.Eng.Sun.COM>
Sender: news@sli.com (news)
Reply-To: rdh@sli.com (or uunet!sli!rdh)
Organization: Software Leverage, Inc. Arlington, Ma
Lines: 20
In-reply-to: jpayne%flam@Sun.COM's message of 2 Jan 90 21:45:25 GMT