Article View: bit.listserv.asm370
Article #130Re: Shifting memory to the right
From: Tom Harper
Date: Fri, 30 Sep 2005 17:09
Date: Fri, 30 Sep 2005 17:09
53 lines
4893 bytes
4893 bytes
In general, this is one of the classic problems of computer programming: placing data in a structure so that it can be searched efficiently. There are many time-tested methods of solving this issue, each with their own plusses and minuses: - VSAM KSDS. This is similar to Ed's idea of isolating the data and the keys, with the addition of the concept of CI and CA splits. - HASHing. This has been implemented by IBM and others, one example being IMS HDAM data bases. Using a good randomizer, it can be fast. Disadvantages include the possibility of long synonym chains. - Binary search. The difficulty here, of course, is the issue of insertions and deletions, which can be handled with various techniques, including multi-level searches, etc. - Serial search. Performs poorly for large numbers, but easy to do insertion. The developer has to determine the ratio of retrievals to insertions/deletions, likely size, performance requirements, time to implement and debug, and select an appropriate design. Tom Harper -----Original Message----- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]On Behalf Of Edward E. Jaffe Sent: Friday, September 30, 2005 11:48 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Shifting memory to the right Michael Stack wrote: > If you're going to do a binary search, why not use a balanced binary > search > tree? If a tree node is a row, your link memory overhead would be > relatively small and your search time would be comparable. And if you > are > not inserting too many rows, the overhead for balancing should be small, > too. A lot less virtual (and real) memory used, as well. > > It's usually (!) less costly to manipulate a data structure than to move > data around. YMMV. See Knuth, TAoCP, Vol 3, 2nd Ed. (Sorting and > Searching) pp 471-473 for a discussion of using a balanced tree to > represent a linear list. In addition, if the search keys themselves are relatively small and represent a small percentage of the total storage for each table entry, it might make sense to place a copy of the keys into the tree structure rather than always using the data pointer during the search. Avoiding access to the real data when performing the search can help keep the working set to a minimum. If the keys are large, this approach probably isn't worth the extra storage requirements for the tree structure. -- ...-----------------------------------------------------------------. | Edward E. Jaffe | | | Mgr, Research & Development | edjaffe@phoenixsoftware.com | | Phoenix Software International | Tel: (310) 338-0400 x318 | | 5200 W Century Blvd, Suite 800 | Fax: (310) 338-0801 | | Los Angeles, CA 90045 | http://www.phoenixsoftware.com | '-----------------------------------------------------------------'
Technical Details
Message-ID:
<D8FAA1D9C78C574F958E6E73E6D1734FAE5993@houexch.nesi.int>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.news2me.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!sn-xit-03!sn-xit-08!sn-xit-14!supernews.com!149.173.6.116.MISMATCH!foggy!vm.sas.com!neonesoft.com!Tom.HarperShow Full Headers
Complete Article Headers
X-Google-Thread: fcdcb,3e46d196c2b56e33
X-Google-Attributes: gidfcdcb,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.news2me.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!sn-xit-03!sn-xit-08!sn-xit-14!supernews.com!149.173.6.116.MISMATCH!foggy!vm.sas.com!neonesoft.com!Tom.Harper
From: Tom Harper <Tom.Harper@neonesoft.com>
Newsgroups: bit.listserv.asm370
Subject: Re: Shifting memory to the right
Date: Fri, 30 Sep 2005 12:09:47 -0500
Organization: SAS Inc.
Lines: 53
Sender: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Message-ID: <D8FAA1D9C78C574F958E6E73E6D1734FAE5993@houexch.nesi.int>
NNTP-Posting-Host: mozart.unx.sas.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: foggy.unx.sas.com 1128100485 19779 10.19.150.41 (30 Sep 2005 17:14:45 GMT)
X-Complaints-To: usenet@unx.sas.com
NNTP-Posting-Date: Fri, 30 Sep 2005 17:14:45 +0000 (UTC)
Comments: Gated by NETNEWS@VM.SAS.COM
Return-Path: <owner-assembler-list@LISTSERV.UGA.EDU>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
Content-class: urn:content-classes:message
Thread-Topic: Re: Shifting memory to the right
Thread-Index: AcXF39aGJTPnpz0JTD2TJRaFf+/42gAAHVtw
X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on cyclops.neonesoft.com
X-Spam-Status: No,
score=0.6 required=4.9 tests=SUBJ_HAS_SPACES autolearn=no
version=3.0.4
X-scanner: Scanned by Xamime-LT 0.1.5
X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.cc.uga.edu id
j8UH9xQ6003782
Approved-By: Tom Harper <Tom.Harper@NEONESOFT.COM>
Return-Path: owner-assembler-list@LISTSERV.UGA.EDU
X-OriginalArrivalTime: 30 Sep 2005 17:14:43.0445 (UTC) FILETIME=[731C6A50:01C5C5E2]
X-Mime-Autoconverted: from 8bit to 7bit by mime827
Originator: daemon@mozart.unx.sas.com