home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: Problem with string processing.
- Message-ID: <1993Jan6.162841.5570@taumet.com>
- Organization: TauMetric Corporation
- References: <1993Jan4.022737.19792@kpc.com> <2mqVwB6w165w@cybrspc.UUCP> <MCGLK.93Jan5005833@yang.cpac.washington.edu> <811@ulogic.UUCP>
- Distribution: usa
- Date: Wed, 6 Jan 1993 16:28:41 GMT
- Lines: 18
-
- hartman@ulogic.UUCP (Richard M. Hartman) writes:
-
- >Actually, on systems w/ block memory move supported at the
- >CPU level, memcpy() can be implemented much more efficently.
- >If there were a decent way of getting the string length w/o
- >counting all the bytes then direct support for strcpy() could
- >be done easily. Are there any CPUs that have a single-instruction
- >way of saying "find the next 0 byte & tell me how far it was from here"?
-
- Of course there are, but this does not mean that such CPU's get a win
- over CPU's which don't have the instruction. One way or another, the
- bytes in the string have to be examined. (Metaphysics aside, that is.)
-
- The question is whether you have one big complicated slow instruction,
- or several small fast simple instructions, or something in between.
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
-