Date: Tue, 17 Mar 1998 18:57:34 +0200 (IST) From: Eli Zaretskii To: Burton Radons cc: djgpp-workers AT delorie DOT com Subject: Re: libc replacement (memcmp) In-Reply-To: <350f6b73.34099775@mail.gec.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 17 Mar 1998, Burton Radons wrote: > memcmp used to compare using char-by-char, so I replaced it with > int-by-int -- quick optimizations, but it hadn't been done in three > years, so... bcmp follows this message. Doesn't GCC inline `memcmp' under -On? > ! while (n > 4) { > ! if (*((int *) p1) != *((int *) p2)) { I suggest making p1 and p2 aligned on 4-byte boundary (with single-byte comparisons) before going full throttle with 4-byte comparison.