Rustacean Station  cover image

Glidesort with Orson Peters

Rustacean Station

00:00

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

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app