Skip to content
HomeVideos
AllLongsCategoriesPlaylists
BooksBlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Refterm Lecture Part 1 - Philosophies of Optimization

    Molly Rocket

    10 HN recommenders · recommended in 14 months, 2021–2026

    YouTube

    18:41 · 93K views · Oct 18, 2021

    Casey Muratori's first refterm lecture lays out philosophies of optimization, distinguishing optimization from non-pessimization, which means avoiding needless work. It uses his fast terminal renderer project to show how fast computers really are.

    HN returns to it constantly in software performance debates as the primer on non-pessimization and why modern software is slow.

    Software Engineering & LanguagesSoftware performance & optimization
    1. 51:04
      [EPILEPSY WARNING] How fast should an unoptimized terminal run?Molly Rocket193K views • 5 years ago
    2. 29:51
      Refterm v2 - Resource usage, binary splat, glyph sizing, and moreMolly Rocket68K views • 5 years ago
    3. 1:01:09
      Plenary: Performance Matters - Emery Berger - CppCon 2020CppCon33K views • 6 years ago
    4. 38:20
      Twitter and Visual Studio RantMolly Rocket158K views • 6 years ago
    5. 1:02:17
      'Fastware' - Andrei Alexandrescu [ ACCU 2016 ]ACCU Conference34K views • 10 years ago
    6. 22:41
      "Clean" Code, Horrible PerformanceMolly Rocket1.2M views • 3 years ago
    7. 1:29:55
      Sorting Algorithms: Speed Is Found In The Minds of People - Andrei Alexandrescu - CppCon 2019CppCon184K views • 7 years ago
    8. 1:27:46
      CppCon 2014: Mike Acton "Data-Oriented Design and C++"CppCon863K views • 12 years ago
    9. 2:50:14
      Simple Code, High PerformanceMolly Rocket464K views • 5 years ago
    10. 42:15
      "Performance Matters" by Emery BergerStrange Loop Conference502K views • 7 years ago
    11. 2:27:34
      Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025Better Software Conference929K views • 1 year ago
    12. 1:48:55
      The Thirty Million Line ProblemMolly Rocket326K views • 8 years ago
    13. 30:12
      Casey Muratori | Smart-Pointers, RAII, ZII? Becoming an N+2 programmerxDahl163K views • 2 years ago
    14. 1:04:48
      "Performance (Really) Matters" with Emery BergerAssociation for Computing Machinery (ACM)7.1K views • 6 years ago
    15. 34:55
      "Outperforming Imperative with Pure Functional Languages" by Richard FeldmanStrange Loop Conference98K views • 5 years ago
    16. 59:11
      How to Speed up a Python Program 114,000 times.InfoQ171K views • 13 years ago
    17. 1:13:41
      CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"CppCon235K views • 12 years ago
    18. 1:02:42
      Preventing the Collapse of Civilization / Jonathan Blow (Thekla, Inc)DevGAMM316K views • 7 years ago
    19. 1:33:02
      2013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++CppNow34K views • 13 years ago
    20. 1:00:58
      CppCon 2017: Chandler Carruth “Going Nowhere Faster”CppCon113K views • 9 years ago

    20 comments from Hacker News

    1. @dundariousNov 2021· in “Anatomy of a Terminal Emulator”

      Casey Muratori's refterm video series is a great example of how to do application design. It focuses on writing a terminal emulator for Windows, but almost all the concepts apply to nixes as well -- even down to the level of OS primitives like memory mappings to create a ring buffer, etc. He builds a nearly complete terminal that appears to better support unicode and escape sequences than windows-terminal, in drastically less code and with literally orders of magnitude better performance. In particular, I like his focus on experimentation to figure out a reasonable upper bound on performance (so you can measure success/failure), "non-pessimisation" (don't do things extrinsic to the actual task), understanding the actual machine and its capabilities (he doesn't use the term, but sometimes called "mechanical sympathy"), and tactics for isolating "bad code" that you probably have to use (at least to get started). this video

      Strongly recommendsView on HN
    2. @jiggawattsJan 2022· in “Reclaiming the lost art of Linux server administration”

      I’ve found this to be an unsuccessful approach in practice. Performance is a complex, many-faceted thing. It has hidden costs that are hard to quantify. Customers leave in disgust because the site is slow. No amount of “throwing more cores at it” will help if there’s a single threaded bottleneck somewhere. Superlinear algorithms will get progressively worse, easily outpacing processor speed improvements. Notably this is a recent thing — single threaded throughout was improving exponentially for decades so many admins internalised the concept that simply moving an app with a “merely quadratic” scaling problem to new hardware will always fix the problem. Now… this does nothing. I’ve turned up at many sites as a consultant at eyewatering daily rates to fix slow apps. Invariably they were missing trivial things like database indexes or caching. Not Redis or anything fancy like that! Just cache control headers on static content. Invariably, doing the right thing from the beginning would have been cheaper. Listen to Casey explain it: this video You need to have efficiency in your heart and soul or you can’t honestly call yourself an engineer. Learn your craft properly so you can do more with less — including less developer time!

      RecommendsView on HN
    3. @hsn915Nov 2021· in “Selecting a programming language can be a form of premature optimization”

      The fallacy of premature optimization rears its ugly head again. When Knuth wrote that quote, he meant something very specific with the word optimization: low level micro optimizations. Spending a lot of time trying to get every little ounce of performance from every little CPU instruction. High level reasonable design decisions are not "optimizations" in this sense at all. You should think of them as non-pessimization. Choosing Python or another slow language is premature pessimization. You just make your program slower for no reason. So choosing a language based on how programs written in it perform is simply non-pessimization. If you are interested in an expansion on this idea, checkout Casey Muratori's lecture about philosophies of optimization: this video The article makes claims about software being "fast enough" and not needing further optimization. But what you call "fast enough" is probably 10000 times slower than what it could be. I'm not joking. People who program in slow languages have a really skewed perception about performance. If a page takes 5 seconds to load, they don't see that as a problem. If a server takes 500ms to respond to a request, they don't see that as a problem. This is simply unacceptable.

      RecommendsView on HN
    4. @grayrestOct 2021· in “55 GiB/s FizzBuzz”

      > The overwhelming majority of slow code isn't slow because it's failed to do this kind of microoptimization, it's slow because it used the wrong algorithm. I disagree. I believe the majority of code is slow because it's written without any consideration at all to performance. I like Casey Muratori's philosophy of non-pessimization where true optmization (measuring, working hot spots) is rare and rarely necessary but massive speedups compared to the general state of the art are achievable by simply not writing code using patterns that are inherently slow. This isn't deep algorithmic stuff it's just avoiding copies and/or pointer chasing. Edit: this video <- Casey's most recent intro to non-pessimization > For a realistic-sized problem, if you write solutions in C and Python with the same amount of effort from equally skilled programmers, the Python version will almost certainly be faster The Advent of Code runs every year and I'm not sure about C (not something I track) but there are plenty of Rust submissions and while the Rust submissions take longer to come in, it's not THAT much longer. From memory it's like 2x on a timescale of minutes. The Python programs are not faster.

      RecommendsView on HN
    5. @infogulchJun 2022· in “Making Code Faster”

      I like Casey Miratory's "non-pessimization" approach in Philosophies of Optimization [1] [2]. He breaks "making a program go faster" into 3 modes: (1) "optimization" which includes counting expected cycles or memory bandwidth, careful benchmarking, designing custom algorithms, etc which can be fun but is expensive and is only rarely applied; (2) "non-pessimization" which is simply avoiding adding extra unnecessary work for the cpu, which should be done 100% of the time but isn't in the industry today; (3) and "fake optimization" which is shallowly repeating 'optimization tips' and conclusions from unrelated cases of (1) without actually measuring it. [1]: this video [2]: [LINK]

      RecommendsView on HN