www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/2001/02/18/13:34:57

Date: Sun, 18 Feb 2001 18:40:04 +0100
From: Marc Lehmann <pcg AT goof DOT com>
To: pgcc AT delorie DOT com
Subject: Re: Probably pgcc-2.95.2.1 does not optimized propertly?
Message-ID: <20010218184004.B2821@cerebro.laendle>
Mail-Followup-To: pgcc AT delorie DOT com
References: <E14UWGo-0005df-00 AT mx7 DOT port DOT ru>
Mime-Version: 1.0
In-Reply-To: <E14UWGo-0005df-00@mx7.port.ru>; from nickols_k@mail.ru on Sun, Feb 18, 2001 at 07:00:21PM +0000
X-Operating-System: Linux version 2.4.1 (root AT cerebro) (gcc version 2.95.2.1 19991024 (release))
Reply-To: pgcc AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: pgcc AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, Feb 18, 2001 at 07:00:21PM +0000, Nick Kurshev <nickols_k AT mail DOT ru> wrote:
> But code which is produced in last case probably will be executed much faster of first (and it is smaller). 

please benchmark. "probably" is always wrong, especially when quoting out
of the amd optimization manual. The way to go, usually, is to implement
the exact opposite of what is in the manual. I am quite fed-up with AMD
since I invested quite some time in implementing some of their suggestions
(for AMD-K6) only to find out code gets slower. Especially their mmx unit
is the biggets joke ever heard :(

>  Avoid long instruction length Use x86 instructions that are
>  less than eight bytes in length. An x86 instruction that is longer
> 
> Clear registers using MOV reg, 0 instead of XOR reg, reg

is mov 0, reg longer than seven bytes?

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg AT goof DOT com      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019