New computers don't speed up old code
Matthias random stuff3 HN recommenders · recommended in 3 months, 2025–2025
explainer · intermediate · evergreen · 2025–2025 on HN
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.
Used as evidence that CPU speed for branchy, dependent code has improved only modestly in 15-20 years, so software optimization matters.
Up next
17 mo on HNHow The Economic Machine Works by Ray Dalio
Principles by Ray Dalio
18 HN recommender · 2014–2026
15 mo on HNTry to Rule Fairly and You'll Be Overthrown
CGP Grey
15 HN recommender · 2016–2025
2 mo on HNVelocity 09: John Allspaw and Paul Hammond, "10+ Deploys Pe
O'Reilly
2 HN recommender · 2018–2023
7 mo on HNIncels | ContraPoints
ContraPoints
7 HN recommender · 2018–2024
3 mo on HNThe Art of the Bodge: How I Made The Emoji Keyboard
Tom Scott
4 HN recommender · 2018–2024
3 mo on HNA Million Dollars vs A Billion Dollars, Visualized: A Road Trip
Tom Scott
3 HN recommender · 2021–2026
2 mo on HNFatboy Slim - The Rockafeller Skank | Het verhaal achter het nummer
Top 2000 a gogo
2 HN recommender · 2021–2021
4 mo on HNWorst Nuclear Accidents in History
Kurzgesagt – In a Nutshell
7 HN recommender · 2021–2023
16 mo on HNHow Python was Shaped by leaky Internals, Armin Ronacher, Flask framework
Видео с мероприятий {speach!
15 HN recommender · 2017–2025
11 mo on HNCppCon 2015: Andrei Alexandrescu “std::allocator...”
CppCon
7 HN recommender · 2017–2025
12 mo on HNPreventing the Collapse of Civilization / Jonathan Blow (Thekla, Inc)
DevGAMM
14 HN recommender · 2020–2025
10 mo on HN"Performance Matters" by Emery Berger
Strange Loop Conference
12 HN recommender · 2019–2025
4 comments from 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 with a single bitwise operation for each bit. The author of the article should consider showcasing this too, since it's a lot more impressive than the measly 1.2x speedup highlighted in the article. I assume the minimal/nonexistent speedups in the article are due to modern CPU branch prediction being quite good. But branch predictors inherently fail miserably at CRC because the conditional is on whether the input bit is 1 or 0, which is essentially random. [0] ▶ this video
Watch this video: ▶ this 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.
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". ▶ this 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 essentially laptop hardware; but it's also interesting to see that a lot of the performance gains really weren't that great actually. he observes a doubling of performance in 15 years! Truth be told most people use laptops now, and truth be told 20 years ago most people used desktops, so it's not totally unfair. Maybe we've bought a lot into marketing.
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. ▶ this video