www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/25/11:18:34

Sender: root AT delorie DOT com
Message-ID: <3905BDEE.BC2AC514@inti.gov.ar>
Date: Tue, 25 Apr 2000 12:46:54 -0300
From: salvador <salvador AT inti DOT gov DOT ar>
Organization: INTI
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.38 i686)
X-Accept-Language: es-AR, en, es
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: [long] gcc performance and possible bug
References: <39046544 DOT ADB90632 AT inti DOT gov DOT ar> <8e44a2$ag7$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
Reply-To: djgpp AT delorie DOT com

Hans-Bernhard Broeker wrote:

> salvador <salvador AT inti DOT gov DOT ar> wrote:
>
> >   I found the problem, when you make the value a constant it is stored
> > in the code segment, too close to the code that is executed. It looks like
> > that's close enough to be inside the pipeline (probably because the CPU
> > is fetching groups of aligned bytes, not just code). Looks like K6 does some
> > pipeline flush when you read/write data that is inside the pipeline (or
> > perhaps a pre-fetch buffer is a better name for it).
>
> This should not usually be any big speed problem, unless you *write*
> into the middle of the code segment, i.e. you violate the const-ness
> of those variables. For all other cases, the CPU should always be able
> to notice that this variable is only read, not written to. Only
> writing into the middle of the .text segment would trigger the code
> cache/prefetch queue to have to be nuked and refilled from scratch, in
> the worst case.

I agree with you but it doesn't seem to be the case of the K6 CPU. If you have a
better theory please explain it. Just moving the constant a little bit does the
magic and isn't the aligment because I tried with different values.
It looks like K6 can't read data from the code that is processing without
introducing a penalty.

SET

--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
                    set AT ieee DOT org set-soft AT bigfoot DOT com
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013



- Raw text -


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