Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!pdn!tscs!tct!chip From: chip@tct.com (Chip Salzenberg) Newsgroups: news.software.b Subject: Re: C-news and SCO Xenix/UNIX Keywords: slow relaynews Message-ID: <281D99DE.478D@tct.com> Date: 30 Apr 91 16:22:53 GMT References: <1991Apr24.030223.7753@DSI.COM> <1991Apr29.160721.1854@robobar.co.uk> Organization: Teltronics/TCT, Sarasota, FL Lines: 16 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 ,