Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: memcpy versus assignment
Message-ID: <1990Jan2.215700.3740@utzoo.uucp>
Organization: U of Toronto Zoology
References: <1657@uwm.edu> <1989Dec31.005904.1910@utzoo.uucp>
Date: Tue, 2 Jan 90 21:57:00 GMT

In article <1989Dec31.005904.1910@utzoo.uucp> I wrote:
>... (Lest anyone think I'm kidding
>about the factor of 2, I've got an experimental memchr() which, on long
>strings, beats every manufacturer's implementation we've tested by a
>factor of at least 2 and usually 3-4... despite being written in portable
>C rather than assembler.)

Several people have written asking about memchr.  It, along with similar
speedups for a lot of the other string functions, will be in the second
release of my freely-redistributable string library.  The release date is
somewhat uncertain, although "sometime in spring" would be a safe guess.
I need to get the C News to-do list under control before I can spare much
time for strings.

The stuff currently isn't in particularly good shape for distribution.
It works, but the source is a mess, and I'm still experimenting with
further optimizations.  There is nothing proprietary about it, but I'd
prefer not to release it widely until it's cleaned up.

The crucial trick, incidentally, is that one does the search a word at a
time rather than a byte at a time.
-- 
1972: Saturn V #15 flight-ready|     Henry Spencer at U of Toronto Zoology
1990: birds nesting in engines | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
