New computers don't speed up old code

Channel:Matthias random stuff · Length:19:25 · Published:2025-04-29 · Views:187256

Watch on YouTube

Summary

Matthias Wandel tests old and new code on a range of PCs, including a new mini PC, to measure how much faster modern hardware really is. He also shows optimization techniques such as branchless code, with benchmark programs on GitHub.

Why HN recommends it

Used as evidence that CPU speed for branchy, dependent code has improved only modestly in 15-20 years, so software optimization matters.

This great video [0] demonstrates how CPU performance has only increased 1.5-2x over the past 15(!) years when executing extremely branchy code. — HN, 2025

Software performance & optimization · Computer architecture & CPUs

Subtitles (excerpt)

I used to upgrade my PC every four years or so and every time I upgraded the new one was about twice as fast as the old one when I tested it. But now I'm wondering how much faster have PCs gotten at executing really old style workloads over the years, and I'm talking old-fashioned C code, single threaded not even using floating point And I have eight old PCs of various ages including this one here which was my daily driver till 2012 and it still runs Windows XP And I just got a new one which is my fastest yet this one's provided by Geekcom who are sponsoring this video, more on that later. And back in 2002 I wrote a C program to find all possible arrangements of the 12 pentomino pieces in a 6x10 grid like this and I figured that would be a really good benchmark. And if I only counted the solutions found instead of printing them out I was able to get that down to 90 seconds on my 500 MHz Celeron at the time But I no longer have any computers that old so I'm not going to go that far back with my tests. And to make this properly old school I'm compiling my code on Windows XP with a Microsoft C compiler from 1998. And my old XP box could run that in just over 7 seconds. My present daily driver can

On Hacker News

This great video [0] demonstrates how CPU performance has only increased 1.5-2x over the past 15(!) years when executing extremely branchy code. Really shows you just how deep modern CPU pipelines have become. The video also showcases a much more impressive branchless speedup: computing CRC checksums. Doing this naïvely with an if-statement for each bit is ~10x slower than doing it branchless wit… — MontyCarloHall, 2025-09
Watch this video: [VIDEO] New computers aren't as much faster as benchmarks would lead you to believe. If your code relies on unpredictable branches, dependept memory accesses in a tight loop, or very tight feedback loops inside computations, new CPUs won't have that much of an edge. — torginus, 2025-08
Maybe since 1980. I recently watched a video that can be summarised quite simply as: "Computers today aren't that much faster than the computers of 20 years ago, unless you specifically code for them". [VIDEO] It's a little bit ham-fisted, as the author was shirking decades of compile optimisations also , and it's not apples to apples as he's comparing desktop class hardware with what is essentia… — dijit, 2025-05
Since 1980 maybe. But since 2005 it increased maybe 5x and even that's generous. And that's half of the time that passed and two decades. [VIDEO] — scotty79, 2025-05

Related videos