In a prior life, I have done a binary search with variable length data two ways. The better and easier way is using a vector of pointers to the data where the key is at a fixed offset with a fixed length. This method adds one more instruction per pass, but otherwise is just like any other binary search.
The second method used a binary chop of the data then scanned for the next entry. It was ugly, but it did its job. There are lots of limitations to it. Chris Blaicher Principal Software Engineer, Software Development Syncsort Incorporated 50 Tice Boulevard, Woodcliff Lake, NJ 07677 P: 201-930-8260 | M: 512-627-3803 E: [email protected] -----Original Message----- From: IBM Mainframe Assembler List [mailto:[email protected]] On Behalf Of Tony Thigpen Sent: Thursday, October 24, 2013 11:46 AM To: MVS List Server 2 Subject: Re: Linear search vs binary All entries will be fixed length. Can't really have variable length and use a binary search. :-) Tony Thigpen
