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

    Fast Inverse Square Root — A Quake III Algorithm

    Nemean

    3 HN recommenders · recommended in 4 months, 2021–2022

    YouTube

    20:08 · 6M views · Nov 28, 2020

    A walkthrough of the Quake III fast inverse square root, explaining where the constant 0x5f3759df comes from. It covers IEEE 754 floats, the bit hack that approximates a logarithm, and a Newton's method refinement.

    HN recommends it as an approachable explanation that makes the famous algorithm finally make sense.

    Mathematics & Theoretical CSAlgorithms & data structuresSoftware performance & optimizationGame history & retro gaming
    1. 26:41
      Finding the BEST sine function for Nintendo 64Kaze Emanuar418K views • 3 years ago
    2. 1:31:28
      Stanford Seminar: Beyond Floating Point: Next Generation Computer ArithmeticStanford Online33K views • 9 years ago
    3. 1:00:17
      Stephan T. Lavavej “Floating-Point <charconv>: Making Your Code 10x Faster With C++17's Final Boss”CppCon41K views • 7 years ago
    4. 18:20
      FIXING the ENTIRE SM64 Source Code (INSANE N64 performance)Kaze Emanuar3.2M views • 4 years ago
    5. 14:28
      Superpositions, Sudoku, the Wave Function Collapse algorithm.Martin Donald764K views • 6 years ago
    6. 9:16
      Floating Point Numbers - ComputerphileComputerphile2.5M views • 12 years ago
    7. 1:19:52
      CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”CppCon264K views • 10 years ago
    8. 26:33
      The Most Underrated AlgorithmVeritasium11M views • 4 years ago
    9. 1:34:42
      The Great Debate @ARITH23: John Gustafson and William Kahandancefan4.2K views • 10 years ago
    10. 5:58
      MarI/O - Machine Learning for Video GamesSethBling12M views • 11 years ago
    11. 16:36
      Hacking at Quantum Speed with Shor's Algorithm | Infinite SeriesPBS Infinite Series238K views • 9 years ago
    12. 22:21
      Reverse emulating the NES to give it SUPER POWERS!suckerpinch1.1M views • 8 years ago
    13. 24:32
      How We Solved the Worst Minigame in Zelda's HistoryLinkus71.1M views • 6 years ago
    14. 17:31
      How Quantum Computers Break Encryption | Shor's Algorithm Explainedminutephysics3.4M views • 7 years ago
    15. 2:48
      TI DOOMTPMFofMFF199K views • 18 years ago
    16. 13:14
      Did Nintendo really forget to Optimize Super Mario 64 ? | MVGModern Vintage Gamer1.3M views • 6 years ago
    17. 44:11
      27c3: Console Hacking 2010 (en)Christiaan00833K views • 15 years ago
    18. 55:02
      GradIEEEnt half decent: The hidden power of imprecise linessuckerpinch391K views • 3 years ago
    19. 53:44
      Console Hacking 2016 (33c3)media.ccc.de166K views • 9 years ago
    20. 14:13
      Quake done Quick - Quake done QuickestQuake done Quick581K views • 16 years ago

    4 comments from Hacker News

    1. @greyfoxJul 2021· in “Copilot regurgitating Quake code, including sweary comments”

      Very interesting that this was posted as I literally JUST watched an even MORE interesting youtube upload about this very bit of code just last weekend. Here's the very fun video if anyone wants to take a look: this video

      Strongly recommendsView on HN
    2. @infogulchSep 2021· in “Bit Patterns of Float”

      Apparently the bit pattern of a float interpreted as an int is sorta-kinda it's own logarithm, which is why the famous fast inverse square root from quake 3 works: log(x^-½) = -½log(x) =~ -log(x) >> 1. This video is approachable and explains it pretty well: this video

      RecommendsView on HN
    3. @colejohnson66Aug 2021· in “One does not simply calculate the absolute value”

      > The bits of a float as an integer literal are proportional to its log2 value (plus a constant), … I watched a video[0] a while back about that. Once that coincidence(?) was explained, Q_rsqrt finally made sense. [0]: this video (~20 minutes)

      RecommendsView on HN
    4. @bitwidgetAug 2022· in “Ask HN: What's a small example of some of the best code ever written?”

      print("Hello World") /s But I've heard good things about the Fast Inverse Square Root Calculation algorithm in the Doom 3 source code. this video

      CitesView on HN