BGB <cr88…@gmail.com> posted:
> On 11/22/2026 7:04 PM, John Savard wrote:
> > On Sun, 22 Nov 2026 16:34:12 -0600, BGB <cr88…@gmail.com> wrote:
> >
> >> To some extent though, does seem like much of the claimed performance
> >> gains of the past 20 years are mostly an illusion though. Most of what
> >> exists due more to "more and faster RAM" than due to the CPUs themselves
> >> actually getting all that much faster. Like, the 2000s era computers
> >> didn't have slow CPUs, they had a small amount of slow RAM (and people
> >> then blamed the CPU for the RAM's deficiencies).
To be fair, we blamed the system.
> >> People can disagree, but this is just what my experience seems to suggest.
> >
> > You are correct that ever since Dennart scaling died, CPUs haven't
> > been getting faster by leaps and bounds the way they used to. Still,
> > in addition to more RAM, there have still been...
> >
> > small incremental improvements in clock speed with scaling,
> > more cores,
> > more cache,
> > more aggressive out-of-order execution
> > ------------
> Had noted, that there seems to be a machine-dependent thing on the
> relative speed of the method used for copying a sequence of
> self-overlapping bytes.
>
> Branch/shift method:
> if(d==1)
> {
> tv=((byte *)dst)[-1];
> tv|=tv<<8;
> tv|=tv<<16;
> tv|=tv<<32;
> ((u64 *)dst)[0]=tv;
> ((u64 *)dst)[1]=tv;
> }else if(d==2)
> {
> tv=((u16 *)dst)[-1];
> tv|=tv<<16;
> tv|=tv<<32;
> ((u64 *)dst)[0]=tv;
> ((u64 *)dst)[1]=tv;
> }else
> ...
> Vs, raw byte-copy method:
> src=dst-d;
> dst[0]=src[0];
> dst[1]=src[1];
> dst[2]=src[2];
> dst[3]=src[3];
> dst[4]=src[4];
> dst[5]=src[5];
> dst[6]=src[6];
> dst[7]=src[7];
> ...
>
> On most of the targets, the former is significantly faster, but
> seemingly on the Intel side, the naive raw byte-copy method sees a large
> boost (and so is not quite so slow in comparison).
When memcopy() is an instruction, small machines can run at cache-width,
and large machines can run at cache-width × ports ...
When memcopy is for(i = 0; i < count; i++ ) to[i] = from[i]; your vVM
unit can run it at SIMD-widths {say 512-bits copied per cycle}.