Re: Stealing a Great Idea from the 6600

Liste des GroupesRevenir à c arch 
Sujet : Re: Stealing a Great Idea from the 6600
De : cr88192 (at) *nospam* gmail.com (BGB)
Groupes : comp.arch
Date : 19. Jun 2024, 19:16:11
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v4v3ot$22rd9$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla Thunderbird
On 6/19/2024 11:11 AM, MitchAlsup1 wrote:
BGB wrote:
 
On 6/18/2024 4:09 PM, MitchAlsup1 wrote:
BGB wrote:
>
On 6/13/2024 3:40 PM, MitchAlsup1 wrote:
 
In this case, scheduling as-if it were an in-order core was leading to better performance than a more naive ordering (such as directly using the results of previous instructions or memory loads, vs shuffling
other
>
instructions in between them).
>
Either way, seemed to be different behavior than seen on either the Ryzen or on Intel Core based CPUs (where, seemingly, the CPU does not care about the relative order).
>
Because it had no requirement of code scheduling, unlike 1st generation
>
RISCs, so the cores were designed to put up good performance scores without any code scheduling.
>
 
Yeah, but why was Bulldozer/Piledriver seemingly much more sensitive to
>
instruction scheduling issues than either its predecessors (such as the
>
Phenom II) and successors (Ryzen)?...
 They "blew" the microarchitecture.
 It was a 12-gate machine (down from 16-gates from Athlon). this puts a "lot more stuff" on critical paths and some forwarding was not done,
particularly change in size between produced result and consumed
operand.
 
OK.
The stuff I could find didn't mention any of this...
More just a lot of mention of "low IPC" with not really much other clarification or context given.

Though, apparently "low IPC" was a noted issue with this processor family (apparently trying to gain higher clock-speeds at the expense of
>
IPC; using a 20-stage pipeline, ...).
 
Though, less obvious how having a longer pipeline than either its predecessors or successors would effect instruction scheduling.
 
>
>
One of the things we found in Mc 88120 was that the compiler should
NEVER
be allowed to put unnecessary instructions in decode-execute slots that
were unused--and that almost invariable--the best code for the GBOoO machine was almost invariably the one with the fewest instructions, and
if several sequences had equally few instructions, it basically did not
matter.
>
For example::
>
     for( i = 0; i < max, i++ )
          a[i] = b[i];
>
was invariably faster than::
>
     for( ap = &a[0], bp = & b[0];, i = 0; i < max; i++ )
          *ap++ = *bp++;
>
because the later has 3 ADDs in the loop wile the former has but 1.
Because of this, I altered my programming style and almost never end up
using ++ or -- anymore.
  
In this case, it would often be something more like:
   maxn4=max&(~3);
   for(i=0; i<maxn4; i+=4)
   {
     ap=a+i;    bp=b+i;
     t0=ap[0];  t1=ap[1];
     t2=ap[2];  t3=ap[3];
     bp[0]=t0;  bp[1]=t1;
     bp[2]=t2;  bp[3]=t3;
   }
   if(max!=maxn4)
   {
     for(; i < max; i++ )
       a[i] = b[i];
   }
 That is what VVM does, without you having to lift a finger.
 
If things are partially or fully unrolled, they often go faster.
 And ALWAYS eat more code space.
 
Granted, but it is faster in this case, though mostly due to being able to sidestep some of the interlock penalties and reducing the amount of cycles spent on the loop itself.
Say, since branching isn't free, more so if one does an increment directly before checking the condition and branching, as is typically the case in a "for()" loop.
Then, there is also the issue of needing to check the condition on entry to the loop body, which is often not necessary on the first iteration, but (except in very narrow cases) is not easily optimized away.

                                                                Using a
large number of local variables seems to be effective (even in cases where the number of local variables exceeds the number of CPU
registers).
 
Generally also using as few branches as possible.
Etc...
Though, can note that BJX2 does have an advantage over x86-64 here in that:
   if(cond)
     { simple-one-liner }
Will typically be turned into predicated instructions.
On Piledriver (and to a lesser extent on K10/Phenom), this was a big pain case, but on Ryzen this seems to have become less of an issue as well.
It is almost a mystery if they are now using the "implicitly turn short forward branches into predication" trick.
I suspect was a big factor for LZ4 decoding performance, since the handling of match and literal lengths requires multiple back-to-back branch instructions and how many bytes are consumed also depends on this.
Though, an LZ4 variant with lengths limited to a single byte (and an alteration to allow for encoding no-match and EOB cases) could gain a little speed here by allowing the length handling to be turned into predication. But, mostly ended up not using it.
Contrast with my RP2 scheme which moves more of this handling to being up-front (and needs fewer memory accesses to decode a match).
Though, does lead to wonk:
RP2 is a little faster and also often gets slightly better compression on BJX2;
LZ4 is faster than RP2 on my Ryzen (but was slower on Piledriver).
Though, can note that compression depends on what is being compressed:
   Text or other similarly structured data:
     RP2 tends to win;
   Executable code and sparse data structures, LZ4 tends to win.
Both run circles around Deflate or other entropy-coded designs though in terms of decode speed.
Though, for things like structure and RAM compression, a format based on aligned DWORDs or QWORDs can work acceptably (but is pretty much entirely ineffective against text or other byte-serialized data formats). Though, this is mostly because RAM and structure-based data tends to keep everything aligned.
Well, say, unlike text where the same string repeating but with a 1 byte alignment difference would fail to be recognized.
Though, the merit of DWORD and QWORD formats is that it is possible to implement higher-speed encoders (since a lot of the "fiddly stuff" needed in a byte-oriented LZ format simply goes away).
Though, for pagefile compression, I was using the wonk of a format with fixed-width 16-bit tag words, and fixed-width 64-bit data. But, BJX2 is not particularly sensitive to alignment issues (so sticking 64-bit literal QWORDs at arbitrary positions within a 16-bit encoded stream doesn't hurt too badly).
The 32-bit variant had a slight advantage for aligned-only in that both the encoded data and encoded stream were fixed 32-bit DWORDs (this was the second place option for pagefile compression; compressing slightly better on average but not winning in terms of encoder speed).
...

Date Sujet#  Auteur
17 Apr 24 * Stealing a Great Idea from the 6600128John Savard
18 Apr 24 +* Re: Stealing a Great Idea from the 6600125MitchAlsup1
18 Apr 24 i`* Re: Stealing a Great Idea from the 6600124John Savard
18 Apr 24 i `* Re: Stealing a Great Idea from the 6600123MitchAlsup1
19 Apr 24 i  `* Re: Stealing a Great Idea from the 6600122John Savard
19 Apr 24 i   `* Re: Stealing a Great Idea from the 6600121John Savard
19 Apr 24 i    `* Re: Stealing a Great Idea from the 6600120MitchAlsup1
20 Apr 24 i     +* Re: Stealing a Great Idea from the 66002John Savard
21 Apr 24 i     i`- Re: Stealing a Great Idea from the 66001John Savard
20 Apr 24 i     `* Re: Stealing a Great Idea from the 6600117John Savard
20 Apr 24 i      `* Re: Stealing a Great Idea from the 6600116John Savard
20 Apr 24 i       `* Re: Stealing a Great Idea from the 6600115MitchAlsup1
20 Apr 24 i        +* Re: Stealing a Great Idea from the 6600105BGB
21 Apr 24 i        i`* Re: Stealing a Great Idea from the 6600104MitchAlsup1
21 Apr 24 i        i +* Re: Stealing a Great Idea from the 660063John Savard
21 Apr 24 i        i i+* Re: Stealing a Great Idea from the 660015John Savard
25 Apr 24 i        i ii`* Re: Stealing a Great Idea from the 660014Lawrence D'Oliveiro
25 Apr 24 i        i ii +* Re: Stealing a Great Idea from the 660012MitchAlsup1
25 Apr 24 i        i ii i+- Re: Stealing a Great Idea from the 66001Lawrence D'Oliveiro
30 Apr 24 i        i ii i`* Re: a bit of history, Stealing a Great Idea from the 660010John Levine
3 May 24 i        i ii i `* Re: a bit of history, Stealing a Great Idea from the 66009Anton Ertl
3 May 24 i        i ii i  +* Re: a bit of history, Stealing a Great Idea from the 66007John Levine
4 May 24 i        i ii i  i`* Re: a bit of history, Stealing a Great Idea from the 66006Thomas Koenig
4 May 24 i        i ii i  i +* Re: a bit of history, Stealing a Great Idea from the 66004John Levine
4 May 24 i        i ii i  i i`* Re: a bit of history, Stealing a Great Idea from the 66003MitchAlsup1
5 May 24 i        i ii i  i i `* Re: a bit of history, Stealing a Great Idea from the 66002Thomas Koenig
5 May 24 i        i ii i  i i  `- Re: a bit of history, Stealing a Great Idea from the 66001MitchAlsup1
28 Jul 24 i        i ii i  i `- Re: a bit of history, Stealing a Great Idea from the 66001Lawrence D'Oliveiro
3 May 24 i        i ii i  `- Re: a bit of history, Stealing a Great Idea from the 66001MitchAlsup1
25 Apr 24 i        i ii `- Re: Stealing a Great Idea from the 66001John Savard
21 Apr 24 i        i i`* Re: Stealing a Great Idea from the 660047MitchAlsup1
23 Apr 24 i        i i +* Re: Stealing a Great Idea from the 660045George Neuner
23 Apr 24 i        i i i`* Re: Stealing a Great Idea from the 660044MitchAlsup1
25 Apr 24 i        i i i `* Re: Stealing a Great Idea from the 660043George Neuner
26 Apr 24 i        i i i  `* Re: Stealing a Great Idea from the 660042BGB
26 Apr 24 i        i i i   `* Re: Stealing a Great Idea from the 660041MitchAlsup1
26 Apr 24 i        i i i    +* Re: Stealing a Great Idea from the 66002Anton Ertl
26 Apr 24 i        i i i    i`- Re: Stealing a Great Idea from the 66001MitchAlsup1
26 Apr 24 i        i i i    +* Re: Stealing a Great Idea from the 66004BGB
26 Apr 24 i        i i i    i+* Re: Stealing a Great Idea from the 66002MitchAlsup1
27 Apr 24 i        i i i    ii`- Re: Stealing a Great Idea from the 66001BGB
26 Apr 24 i        i i i    i`- Re: Stealing a Great Idea from the 66001MitchAlsup1
27 Apr 24 i        i i i    `* Re: Stealing a Great Idea from the 660034BGB
27 Apr 24 i        i i i     `* Re: Stealing a Great Idea from the 660033MitchAlsup1
28 Apr 24 i        i i i      `* Re: Stealing a Great Idea from the 660032BGB
28 Apr 24 i        i i i       `* Re: Stealing a Great Idea from the 660031MitchAlsup1
28 Apr 24 i        i i i        `* Re: Stealing a Great Idea from the 660030BGB
28 Apr 24 i        i i i         +* Re: Stealing a Great Idea from the 660024BGB
28 Apr 24 i        i i i         i`* Re: Stealing a Great Idea from the 660023BGB
28 Apr 24 i        i i i         i `* Re: Stealing a Great Idea from the 660022Thomas Koenig
28 Apr 24 i        i i i         i  `* Re: Stealing a Great Idea from the 660021BGB
28 Apr 24 i        i i i         i   `* Re: Stealing a Great Idea from the 660020BGB
28 Apr 24 i        i i i         i    +* Re: Stealing a Great Idea from the 66002Thomas Koenig
28 Apr 24 i        i i i         i    i`- Re: Stealing a Great Idea from the 66001BGB
29 Jul 24 i        i i i         i    +* Re: Stealing a Great Idea from the 660016Lawrence D'Oliveiro
29 Jul 24 i        i i i         i    i+* Re: Stealing a Great Idea from the 66006BGB
30 Jul 24 i        i i i         i    ii`* Re: Stealing a Great Idea from the 66005Lawrence D'Oliveiro
30 Jul 24 i        i i i         i    ii `* Re: Stealing a Great Idea from the 66004BGB
31 Jul 24 i        i i i         i    ii  `* Re: Stealing a Great Idea from the 66003Lawrence D'Oliveiro
31 Jul 24 i        i i i         i    ii   `* Re: Stealing a Great Idea from the 66002BGB
1 Aug 24 i        i i i         i    ii    `- Re: Stealing a Great Idea from the 66001Lawrence D'Oliveiro
29 Jul 24 i        i i i         i    i`* Re: Stealing a Great Idea from the 66009Terje Mathisen
29 Jul 24 i        i i i         i    i `* Re: Stealing a Great Idea from the 66008MitchAlsup1
30 Jul 24 i        i i i         i    i  +- Re: Stealing a Great Idea from the 66001Lawrence D'Oliveiro
30 Jul 24 i        i i i         i    i  +* Re: Stealing a Great Idea from the 66004Michael S
30 Jul 24 i        i i i         i    i  i`* Re: Stealing a Great Idea from the 66003MitchAlsup1
31 Jul 24 i        i i i         i    i  i `* Re: Stealing a Great Idea from the 66002BGB
1 Aug 24 i        i i i         i    i  i  `- Re: Stealing a Great Idea from the 66001Lawrence D'Oliveiro
1 Aug 24 i        i i i         i    i  `* Re: Stealing a Great Idea from the 66002Thomas Koenig
1 Aug 24 i        i i i         i    i   `- Re: Stealing a Great Idea from the 66001MitchAlsup1
29 Jul 24 i        i i i         i    `- Re: Stealing a Great Idea from the 66001George Neuner
28 Apr 24 i        i i i         `* Re: Stealing a Great Idea from the 66005MitchAlsup1
28 Apr 24 i        i i i          `* Re: Stealing a Great Idea from the 66004BGB
29 Apr 24 i        i i i           `* Re: Stealing a Great Idea from the 66003MitchAlsup1
29 Apr 24 i        i i i            `* Re: Stealing a Great Idea from the 66002BGB
29 Apr 24 i        i i i             `- Re: Stealing a Great Idea from the 66001Thomas Koenig
29 Apr 24 i        i i `- Re: Stealing a Great Idea from the 66001Tim Rentsch
21 Apr 24 i        i `* Re: Stealing a Great Idea from the 660040BGB
21 Apr 24 i        i  `* Re: Stealing a Great Idea from the 660039MitchAlsup1
22 Apr 24 i        i   +* Re: Stealing a Great Idea from the 66003BGB
22 Apr 24 i        i   i`* Re: Stealing a Great Idea from the 66002MitchAlsup1
22 Apr 24 i        i   i `- Re: Stealing a Great Idea from the 66001BGB
22 Apr 24 i        i   +* Re: Stealing a Great Idea from the 66002John Savard
22 Apr 24 i        i   i`- Re: Stealing a Great Idea from the 66001BGB
22 Apr 24 i        i   `* Re: Stealing a Great Idea from the 660033Terje Mathisen
22 Apr 24 i        i    +- Re: Stealing a Great Idea from the 66001BGB
13 Jun 24 i        i    `* Re: Stealing a Great Idea from the 660031Kent Dickey
13 Jun 24 i        i     +* Re: Stealing a Great Idea from the 660016Stefan Monnier
13 Jun 24 i        i     i`* Re: Stealing a Great Idea from the 660015BGB
13 Jun 24 i        i     i `* Re: Stealing a Great Idea from the 660014MitchAlsup1
14 Jun 24 i        i     i  `* Re: Stealing a Great Idea from the 660013BGB
18 Jun 24 i        i     i   `* Re: Stealing a Great Idea from the 660012MitchAlsup1
19 Jun 24 i        i     i    +* Re: Stealing a Great Idea from the 66008BGB
19 Jun 24 i        i     i    i`* Re: Stealing a Great Idea from the 66007MitchAlsup1
19 Jun 24 i        i     i    i +* Re: Stealing a Great Idea from the 66005BGB
19 Jun 24 i        i     i    i i`* Re: Stealing a Great Idea from the 66004MitchAlsup1
20 Jun 24 i        i     i    i i `* Re: Stealing a Great Idea from the 66003Thomas Koenig
20 Jun 24 i        i     i    i i  `* Re: Stealing a Great Idea from the 66002MitchAlsup1
21 Jun 24 i        i     i    i i   `- Re: Stealing a Great Idea from the 66001Thomas Koenig
20 Jun 24 i        i     i    i `- Re: Stealing a Great Idea from the 66001John Savard
19 Jun 24 i        i     i    +- Re: Stealing a Great Idea from the 66001Thomas Koenig
20 Jun 24 i        i     i    +- Re: Stealing a Great Idea from the 66001MitchAlsup1
31 Jul 24 i        i     i    `- Re: Stealing a Great Idea from the 66001Lawrence D'Oliveiro
13 Jun 24 i        i     +* Re: Stealing a Great Idea from the 660013MitchAlsup1
14 Jun 24 i        i     `- Re: Stealing a Great Idea from the 66001Terje Mathisen
22 Apr 24 i        `* Re: Stealing a Great Idea from the 66009John Savard
18 Apr 24 `* Re: Stealing a Great Idea from the 66002Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal