chip@tct.com (Chip Salzenberg) (04/30/91)
According to ronald@robobar.co.uk (Ronald S H Khoo): >This problem is probably far more generic than it wants to be. The strchr >in all the SCO development systems I have to hand is the same >(that's versions 2.2.0b 2.3.0d 2.3.1b 3.2.0f) and is an assembly coded >version of (approximately) > > char *strchr(char *s, c) { return memchr(s, c, strlen(s)); } I disassembled the SCO UNIX 3.2 development system implementation of strchr. The news is good: I found an unrolled loop (4x), which is much faster than the simplistic implementation shown above. -- Brand X Industries Custodial, Refurbishing and Containment Service: When You Never, Ever Want To See It Again [tm] Chip Salzenberg <chip@tct.com>, <uunet!pdn!tct!chip>