Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Optimizing Binary Search - Advanced Techniques and Performance Improvements

CppCon via YouTube

Overview

Explore advanced optimization techniques for binary search algorithms in this CppCon 2022 conference talk by Sergey Slotin. Delve into branchless programming, memory layout optimization, and SIMD instructions to achieve up to 15x performance improvements over std::lower_bound. Learn how to apply these techniques to fundamental algorithms, making them significantly faster and more efficient. Discover the potential for multifold improvements in textbook algorithms and gain insights into performance engineering that can be applied to various software projects. Follow along as Slotin demonstrates the development of an optimized binary search algorithm, covering topics such as pipeline hazards, cache efficiency, memory optimization, and adaptive tree growth.

Syllabus

Introduction
Agenda
Formalization
Comparisons
Average Time
Pipeline
Hazards
Loop Condition
Cache Efficiency
Cache Lines
Memory Optimization
Ancestor Number System
Binary Tree
Example
Performance
Risk
Node Size
Vector procedure
Bitrees
Two fundamental problems
Btrees
Performance improvements
Adaptive tree growth
Layer modifications
Other data types
B3 inspired approach
Results
Question

Taught by

CppCon

Reviews

Start your review of Optimizing Binary Search - Advanced Techniques and Performance Improvements

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.