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
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner