From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19449 invoked by alias); 4 Apr 2003 03:50:26 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 19438 invoked from network); 4 Apr 2003 03:50:26 -0000 Received: from unknown (HELO egil.codesourcery.com) (66.92.14.122) by sources.redhat.com with SMTP; 4 Apr 2003 03:50:26 -0000 Received: from zack by egil.codesourcery.com with local (Exim 3.36 #1 (Debian)) id 191IDh-0004GG-00; Thu, 03 Apr 2003 19:50:25 -0800 To: Kevin Atkinson Cc: gcc@gcc.gnu.org Subject: Re: Slow memcmp for aligned strings on Pentium 3 From: Zack Weinberg Date: Fri, 04 Apr 2003 08:52:00 -0000 In-Reply-To: (Kevin Atkinson's message of "Thu, 03 Apr 2003 21:11:04 -0500 (EST)") Message-ID: <87llyq9b0e.fsf@egil.codesourcery.com> User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux) References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-04/txt/msg00171.txt.bz2 Kevin Atkinson writes: > I was doing some tests with with memcmp and it seams that gcc 3.2.2 always > uses cmps, even for aligned strings. > > I did some tests and discovered that using cmps was rather slow, compared > to a simple loop and then a bswap and subtract at the end. Patches are welcome. zw