Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.sources Subject: Re: public-domain string(3) Message-ID: <3388@utzoo.UUCP> Date: Wed, 30-Nov-83 16:11:37 EST Article-I.D.: utzoo.3388 Posted: Wed Nov 30 16:11:37 1983 Date-Received: Wed, 30-Nov-83 16:11:37 EST References: <3385@utzoo.UUCP> Organization: U of Toronto Zoology Lines: 18 For those among the audience interested in bit-twiddling efficiency, I've just had a quick look at how the (pdp11) assembly code for my string routines compares to that of the V7 routines. Pretty close. There are one or two cases where my versions actually do better, most of the time the V7 routines are a bit better, and the differences are never large. Most of the cases where V7 comes out ahead are places where the V7 code is running a scanning pointer past the beginning or end of a string and then backing it up to the boundary it went past. This is a slightly dubious practice if one is very concerned about portability; on a segmented machine, a pointer that has been backed up past the beginning of a segment can point heaven-knows-where, and one might possibly run into problems trying to "backspace" it. The absence of this particular trick in my code means that there are a few places where my routines don't get the full benefit of the 11's autoincrement addressing modes. That's about the only difference. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry