Article View: comp.arch
Article #913Re: Very Depressing Video
From: BGB
Date: Mon, 23 Nov 2026 20:51
Date: Mon, 23 Nov 2026 20:51
169 lines
7113 bytes
7113 bytes
On 11/22/2026 7:04 PM, John Savard wrote:
> On Sun, 22 Nov 2026 16:34:12 -0600, BGB <cr88192@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).
>>
>> 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
>
Probably also true.
I have noted that, for example, the speed of Zstd seems to vary widely
depending on what hardware it runs on.
So, there is something about these older CPUs that doesn't seem to work
well, and is highly independent of the memcpy speeds. It also seems to
perform comparably poorly on the RasPi's.
On a lot of these targets, it gives performance slightly worse than
zlib, but on new/high-end hardware sees a big jump and pulls
significantly ahead of zlib. Where zlib also seems to follow a flatter
curve more directly tied to CPU clock speed (and not so much based on
the memcpy curve).
This leaves it as a bit on an oddity (may need investigation).
In any case though, Zstd does beat zlib on compression ratio.
Just sort of a mystery why it would seemingly follow the CPU speed curve
on older machines (with ~ zlib performance), then suddenly jump up
closer to the "actually fast" byte-based LZ compressors, but only on
newer/fancier hardware.
Well, so seemingly something significant happened...
But, only for certain types of programs.
I have not tested my RP2 Huffman post-compressor on the Merom or
Athlon-XP, it is possible that it might crash into the same wall as Zstd
on these, as its use of a 4-way interleaved Huffman decoding strategy is
vaguely similar to the approach used by Zstd.
Where, say, one interleaves 4 streams of Huffman coded symbols, and then
decodes 4 symbols in a row from each stream, for 16 symbols per loop
iteration.
So, seemingly, something changed between ~ 2010-2015 or so (with Intel
and AMD), that led to a fairly sudden jump in Zstd speeds; but with
relatively modest effects to other areas.
The speed curve for LZ4 is much flatter, but across all of the Intel
style CPUs, LZ4 is fast and scales roughly with memcpy speed.
Similar with RP2 (mostly follows a similar curve to LZ4 here).
LZ4 seems to take a comparably larger (relative) performance hit on AMD
hardware in general, and on particularly on older AMD hardware.
Say, for decode speed:
Xen+: LZ4 and RP2 are tied
Kaby Lake: LZ4 wins
Merom and E5410: LZ4 wins
Piledriver and Athlon XP: RP2 wins
XG2 / XG3: RP2 wins.
Though, speed is usually close enough to be more decided based on ratio,
but as noted:
RP2 tends to win on ratio for general data compression;
LZ4 tends to win on ratio for machine-code.
So, RP2 did not displace LZ4 in the case of compressing PE/COFF images.
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).
Can note that on Piledriver, it was preferable to avoid misaligned
access whenever possible, and for copy loops, to instead use shifting
and masking to fake misaligned bulk copies and similar.
This approach was notably slower on pretty much everything not
Piledriver; at least excluding a lot of the RISC-V SoC's where suddenly
this approach looks attractive again (because the only other option is
copying bytes one at a time, which also sucks).
In any case though, it seems like a comparably much more gradual curve
than the orders of magnitude gains I had seen some people claim.
And, many of the speedups that are seen, are difficult to fully separate
from "More RAM, faster RAM".
> Since Core 2 Duo was the revival of the Pentium 3 after the death of
> Dennard scaling took the Pentium 4 with it, indeed it is squarely in
> the period during which improvement was slow.
>
> Still, the reviewer claimed that in no way could a modern A-list game
> be successfully ported to this RISC-V setup, it just didn't have the
> power. So presumably there was some difference.
>
OK, I don't really play many modern AAA games, so I don't know there.
I do know that neither of my older laptops can run Minecraft though, but
this could be more due to the lack of RAM and old/weak graphics hardware.
My own 3D engines held up a fair bit better though.
> John Savard
Technical Details
Message-ID:
<11e28vv$27g58$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<6aff95fd.2756312@news.eternal-september.org> <6b02f61c.2940750@news.eternal-september.org> <11dvql5$1cfvl$1@dont-email.me> <6b038fcc.42284937@news.eternal-september.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: BGB <cr88192@gmail.com> Newsgroups: comp.arch Subject: Re: Very Depressing Video Date: Mon, 23 Nov 2026 14:51:10 -0600 Organization: A noiseless patient Spider Lines: 169 Message-ID: <11e28vv$27g58$1@dont-email.me> References: <6aff95fd.2756312@news.eternal-september.org> <6b02f61c.2940750@news.eternal-september.org> <11dvql5$1cfvl$1@dont-email.me> <6b038fcc.42284937@news.eternal-september.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 23 Nov 2026 20:51:12 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2343080"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19HF/Ut5lAN6/xekzjz0SVxo3w3HRCoVf4="; posting-host="8a0134d6ec2a0076287ede38999921a2" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:ljyu0rXZDJHV3TTR3kA+PWSQEDM= sha256:onYyP/O8bcgM1NI0teA5xKW8kZVPF9uucYe1zAsus9M= sha1:XwX1URcBeEtuzolFJ3J0DDkGmKE= sha256:kRcv1G6AuvMcSQC/HsLLeTAVR1Yhc401FwCdcHvYNbM= Content-Language: en-US In-Reply-To: <6b038fcc.42284937@news.eternal-september.org>