Navigate Select ESC Close

40x Faster Binary Search

2025-01-10 Science & Technology
145.1k
2.9k
325
ThePrimeTime
ThePrimeTime
1.1m subscribers

Unlock all features

FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.

Description

Twitch https://twitch.tv/ThePrimeagen Discord https://discord.gg/ThePrimeagen Become Backend Dev: https://boot.dev/prime (plus i make courses for them) This is also the best way to support me is to support yourself becoming a better backend engineer. ### LINKS https://curiouscoding.nl/posts/static-search-tree/ By: Ragnar Groot Koerkamp | https://x.com/curious_coding/ Great News? Want me to research and create video????: https://www.reddit.com/r/ThePrimeagen Kinesis Advantage 360: https://bit.ly/Prime-Kinesis Get production ready SQLite with Turso: https://turso.tech/deeznuts

Top Comments (10)

@thrash1337 2025-01-10

A 62-minute article fits in a 84 minute video. This is the 1.35x developer.

567 9 replies
@metusharjain 2025-01-10

Disappointed that he used Rust instead of Assembly directly.

230 12 replies
@PileOPoop1 2025-01-10

39:55 SSE SIMD was added to CPUs in 1999 and LLVM didnt get auto vectorization until 2012. Vast majority of SIMD is written by hand.

162 12 replies
@danielmelo389 2025-01-10

This guy: "Then I figured the clock pulse takes 0.1 phantom seconds to go to from L3 to then process unit, so I patched some nano graphene wires to the cpu and improved 1.764x the running time"

102 9 replies
@dougmercer 2025-01-10

1:13:49 oh dang, jump scare when this banger blog post references a paper from someone I've worked with (Paul Medvedev)

77 3 replies
@Plaufin 2025-01-10

I have no clue what the fuck this is, i dont know programming but i love how he goes trough it. Whats even funnier is that even him cant keep up... CLASSIC ASSEMBLY

59 4 replies
@mike200017 2025-01-11

I think it's the first time I've heard this layout being referred to as an Eytzinger layout. It's typically called a heap layout or a breadth-first layout. I've been using this for many many years. It's the starting design for any kind of N-ary tree for which performance matters. If performance really matters, at a large scale, you should consider a von Emde Boas layout, which is essentially a recursively subdividing breadth-first layout of subtrees, which has some nice cache-oblivious performance properties (i.e., cache-aware optimization means coming up with an implementation that performs optimally for a specific memory architecture, and thus, the implementation depends on that parameters of the architecture (e.g., cache sizes, latencies, etc.), while cache-oblivious optimization yields a single near-optimal implementation for any memory architecture, which obviously scales much better). A saying I've adopted over the years is: "If you're not maxing out your system's memory bus, you could be doing better."

24 1 replies
@juice2 2025-01-10

We had 3 slots, 4 children, a root node of 3, 17, 69 (nice), and a whole galaxy of numbers stored in it. Not that we need all of that to search a value, but once you get locked in into a serious data structure, the tendency is to push it as far as you can.

8
@Rohinthas 2025-01-10

My man still got the Internet Comment Etiquette references down to a subconscious level

6
@sjfsr 2025-01-13

The video was definitely encouraging. My college education, decades ago, was very adv data structure oriented and seeing how a person can optimize such an old search algorithm is inspiring.

6

Unlock the Data Inside
Turn Videos into Knowledge

  • Get FREE 10/day: transcripts, summaries, chats
  • Chat with videos, export text & PDF
  • $1 free API credit for RAG, chatbots & research

Free forever plan • All features unlocked

App screenshot