HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Simple Code, High Performance

Molly Rocket6 HN recommenders · recommended in 6 months, 2021-2025
YouTube
463K views · 5 years ago · lecture · evergreen

Casey Muratori's University of Twente guest lecture is a case study in how straightforward code can cut thousands of lines and tens of seconds of runtime down to a few dozen lines running in under a second. It uses concrete examples to show why software is often an order of magnitude slower than it should be.

HN people recommend it to anyone wanting a practical sense of what CPUs can really do and why abstraction layers cost so much performance.

Software performance & optimizationComputer architecture & CPUs#optimization#simd#cpuarchitecture#caseymuratori#gameprogramming#abstractioncost

10 comments from Hacker News

@38362936482025 · in “We were wrong about GPUs”

It's Casey Muratori, he's an American gamedev, not a professor. The video was a recorded guest lecture for a uni in the Netherlands though. And it wasn't redone in assembly, it was C++ with SIMD intrinsics, which might as well just be assembly. ▶ this video

CitesView on HN
@kleiba2024 · in “I Waited 10B Cycles and All I Got Was This Loading Screen”

Casey Muratori started a whole educational webseries about this - the fact that hardware is getting faster and faster but the user experience seems to be staying the same. ▶ this video He also has a "performance-aware programming" series: link

RecommendsView on HN
@mtzet2024 · in “Ask HN: How can I learn about performance optimization?”

Most software in the industry is slow because it's doing a lot of stuff that it shouldn't. Often times additional "optimization" layers adds caching, but makes getting to the root of the issue harder. The biggest win is primarily getting rid of things you don't need and secondarily operating on things in batch. My playbook for optimizing in the real world is something like this: 1. Understand what you're actually trying to compute end-to-end. The bigger the chunk you're trying to optimize, the greater the potential for performance. 2. Sketch out what an optimal process would look like. What data do you need to fetch, what computation do you need to do on this, how often does this need to happen. Don't try to be clever and micro-optimize or cache computations. Just focus on only doing the things you need to do in a simple way. Use arrays a lot. 3. Understand what the current code is actually doing. How close to the sketch above are you? Are you doing a lot of I/O in the middle of the computation? Do you keep coming back to the same data? If you want to understand the limits of how fast computers are, and what optimal performance looks like I'd recommend two talks that come with a very different perspective from what you usually hear: 1. Mike Acton's talk at cppcon 2014 link 2. Casey Muratori's talk about optimizing a grass planting algorithm ▶ this video

RecommendsView on HN
@akasakahakada2023 · in “Ask HN: Resources for High Performance Computing?”

1. Single-thread performance This is hardly related to HPC. The closest thing maybe code optimization and competitive programming. First learn how to do anything fast in single process, then think about scale it up later. 2. Parallel programming Learn MPI. Specifically mpi4py. Once you go MPI, you never use python's multiprocessing module (it sucks). But stuffs are mostly about solving linear algebra problems, which I am not that interested in. 4. Distributed Computing Related to MPI. But nowaday distributed GPU computing become a thing, thing that I can think of is Dask. Don't know how to use that. link 5. Quantum Computing Completely unrelated to HPC, at least in the near future (10 to 30 years). Areas that is the most active in this field is molecular computation. If you don't have a phy/chem PHD, you are not able to read anything beyond college level stuff in this field. And those are only basics stuff like elementary schools' arithmetics. But write your own program to solve those quantum problems in classical computers is interesting, because people there only think about problems that cause scaling issue, not the others. That's why some may think that quantum computer is a replacement of supercomputers. If you can find ways and invent techniques that can reduce timecomplexity in terms of classical algorithm, you are welcome. And literally there is a lot of room for anyone because every quantum computer emulator is unoptimized and slow as hell. Google, Microsoft, IBM,

CitesView on HN
@Pr0ject2172022 · in “What we can learn from vintage computing”

Thank you for the detailed explanation! It sounds like programming computers back then would have been a joy. Casey Muratori's talks[0] on performance and optimization sparked an interest in me to start putting thought into what the CPU actually does (which wasn't taught when I learned web development). Since discovering his talks, I've been on the hunt for more learning materials. [0] ▶ this video

Strongly recommendsView on HN
@mrv_asura2022 · in “Algorithms for Modern Hardware”

The timing of this is great! I just watched Casey Muratori's lecture, "Simple Code, High Performance"[1] and its follow-up videos[2, 3]. I highly recommend watching it. It is about Software Optimization, and gives practical and high-level understanding of topics like CPU Architecture, SIMD etc. [1] ▶ this video [2] link [3] link

Strongly recommendsView on HN
@iamwil2021 · in “Why can’t you design noise in frequency space?”

Blue noise is useful in games for generating more natural looking scenes. Here's an example of how to algorithmically place grass in the game "The Witness". ▶ this video So if you use white noise, it looks unnaturally clustered with patches. This is the part that discusses the noise. ▶ this video

CitesView on HN
@ocharles2021 · in “Why can’t you design noise in frequency space?”

For one real application of blue noise in particular, see ▶ this video (22:30 is a good starting point). Here Casy explains a grass planting algorithm for games, where white noise wouldn't be suitable.

RecommendsView on HN
@DrBazza2021 · in “An Epic future for SPJ”

> Speak for yourself; most phones I see still take 2+ seconds to open some apps. Why is that though? I've written code since the 8 bit days of BBC micros and ZX Spectrums. Casey Muratori's (who has been on here a lot lately) talk nails it [1] - developers just don't realise how fast their code could and should run. And the fact that we have layers upon layers of frameworks and no one cares. [1] ▶ this video

Strongly recommendsView on HN
@rasz2021 · in “Ask HN: How were video games from the 90s so efficient?”

There are no tricks, you just have to give up mountains of levels of abstraction accumulated over the years. ▶ this video

CitesView on HN
The Thirty Million Line Problem1:48:55

The Thirty Million Line Problem

Molly Rocket
326K views • 8 years ago
"Clean" Code, Horrible Performance22:41

"Clean" Code, Horrible Performance

Molly Rocket
1.2M views • 3 years ago
New computers don't speed up old code19:25

New computers don't speed up old code

Matthias random stuff
187K views • 1 year ago
How to Speed up a Python Program 114,000 times.59:11

How to Speed up a Python Program 114,000 times.

InfoQ
171K views • 13 years ago
Twitter and Visual Studio Rant38:20

Twitter and Visual Studio Rant

Molly Rocket
158K views • 6 years ago
A Crash Course in Modern Hardware by Cliff Click59:21

A Crash Course in Modern Hardware by Cliff Click

Devoxx
21K views • 9 years ago
Refterm Lecture Part 1 - Philosophies of Optimization18:41

Refterm Lecture Part 1 - Philosophies of Optimization

Molly Rocket
93K views • 5 years ago
CppCon 2017: Chandler Carruth “Going Nowhere Faster”1:00:58

CppCon 2017: Chandler Carruth “Going Nowhere Faster”

CppCon
113K views • 9 years ago
"Performance (Really) Matters" with Emery Berger1:04:48

"Performance (Really) Matters" with Emery Berger

Association for Computing Machinery (ACM)
7K views • 6 years ago
[EPILEPSY WARNING] How fast should an unoptimized terminal run?51:04

[EPILEPSY WARNING] How fast should an unoptimized terminal run?

Molly Rocket
193K views • 5 years ago
code::dive conference 2014 - Scott Meyers: Cpu Caches and Why You Care1:16:58

code::dive conference 2014 - Scott Meyers: Cpu Caches and Why You Care

NOKIA Technology Center Wrocław
231K views • 11 years ago
"Performance Matters" by Emery Berger42:15

"Performance Matters" by Emery Berger

Strange Loop Conference
502K views • 7 years ago
Refterm v2 - Resource usage, binary splat, glyph sizing, and more29:51

Refterm v2 - Resource usage, binary splat, glyph sizing, and more

Molly Rocket
68K views • 5 years ago
CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"1:13:41

CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"

CppCon
235K views • 12 years ago
'Fastware' - Andrei Alexandrescu [ ACCU 2016 ]1:02:17

'Fastware' - Andrei Alexandrescu [ ACCU 2016 ]

ACCU Conference
34K views • 10 years ago
Plenary: Performance Matters - Emery Berger - CppCon 20201:01:09

Plenary: Performance Matters - Emery Berger - CppCon 2020

CppCon
32K views • 6 years ago
Where Does Bad Code Come From?42:21

Where Does Bad Code Come From?

Molly Rocket
282K views • 5 years ago
Someone improved my code by 40,832,277,770%28:47

Someone improved my code by 40,832,277,770%

Stand-up Maths
3.1M views • 4 years ago
Halide Talk25:52

Halide Talk

Andrew Adams
53K views • 12 years ago
Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 20252:27:34

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025

Better Software Conference
926K views • 1 year ago