Mail Archives: djgpp/2000/04/25/09:43:51
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.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -