You're doing Binary Search wrong!

Try Scrimba for free today, or save 20% on the Pro plan https://scrimba.com/?via=computerbread Fullstack Path: https://scrimba.com/fullstack-path-c0... Binary Search Course: https://scrimba.com/data-structures-a... --- Today, we learn about a few optimization techniques on a very popular algorithm. We learn how we can turn Binary Search into a branchless program and how we can use prefetching to improve performances! Want to level up? Try scrimba, the best way to learn programming Sign up for free or go Pro with 20% off: https://scrimba.com/?via=computerbread (affiliate link, I may earn a commission if you sign up through this link) Zig playlist:    • zig   Leetcode playlist:    • Interview Question   JavaScript playlist:    • JavaScript   To support me (if you feel like it): https://ko-fi.com/computerbread/ Cheatcheet/mindmap: https://ko-fi.com/s/34966c8fb1 Twitter:   / computerbread   Subscribe:    / @computerbread   ---- links: https://arxiv.org/pdf/1509.05053 https://en.algorithmica.org/hpc/data-... https://algorithmica.org/en/eytzinger https://news.ycombinator.com/item?id=... https://cglab.ca/~morin/misc/arraylay...    • Architecture All Access: Modern CPU Archit...   https://c9x.me/x86/html/file_module_x...    • How Branch Prediction Works in CPUs - Comp...   --- C++, C, Binary Search, branchless, pipeline, CPU architecture, conditional move instruction, cmov, Eytzinger layout, branchless programming, prefetching, memory caches