3min chapter

 Rustacean Station  cover image

Glidesort with Orson Peters

Rustacean Station

CHAPTER

The Problem With Three Way Comparisons

The three way comparison is just slow because on the low level, if you're doing it based on branches, there are like instructions where you can like compute an address and then immediately jump to it at address. And especially when you start doing branchless stuff, where you are using this instruction called CMOS conditional move,. It's all done in one instruction without any branches. All that stuff is binary, the fast of is binary. There's an in place technique where you essentially you find an element on the left that should go on the right and you swap the two. That's another approach but now you're doing two passes over it, right? Like you have to know where the data

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode