One more point regarding = and == (more flamage)

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Wed Mar 27 08:58:03 AEST 1991


In article <1991Mar26.180311.29125 at rlgvax.Reston.ICL.COM> scc at rlgvax.OPCR.ICL.COM (Stephen Carlson) writes:
> 	while (*s++ == *t++)
> 		;
> is not well set up to compare two arrays.

Actually, sentinels are among the fastest ways to do a linear search
without wasting noticeable extra space.

> Statement (b) is suspicious, rare, and useless.

You are exaggerating.

---Dan



More information about the Comp.lang.c mailing list