Down the Rabbit Hole: An Exploration of Stack Overflow Questions
summary
Shows actual Stack Overflow questions and then measures solutions: benchmarks use a logger class that counts comparisons and swaps on libc++ and find nth_element vs partial_sort gives far more swaps and roughly double comparisons for nth_element on this machine, while first_two custom algorithm needs at most two swaps and matches partial_sort on comparisons so yields only a small win; demonstrates a lambda wrapper for ispunct to disambiguate overloads avoid UB with signed char; uses equal_range with transparent comparator on tuples for partial-key searches.
AI-written summary · about
chapters (22)
- 0:00Intro
- 3:10Stack Overflow Question
- 4:48Example Question
- 8:29Which is Better
- 14:55Complexity
- 17:44Class
- 18:41Comparisons and swaps
- 20:25Can we do better
- 21:43Comparisons
- 22:32Implementation Specific
- 24:23Down the Rabbit Hole
- 28:50Partial Sword vs Partial Sort
- 30:27Is this actually worth doing
- 35:54A different question
- 36:59Unresolved overletter function type
- 38:45Addressing standard library functions
- 40:33Using a lambda
- 42:04IsPunk
- 46:42lambda
- 50:24transparent comparisons
- 54:04comparison functor
- 55:54the big picture
related talks
53mStaying Ahead of the Curve
01h 52mThe evolving search for effective C++ - Keynote
52mCompSci and My Day Job
59mTop 10 Algorithms for Coding Interviews
26mStaying ahead of the curve
54mFull Stack Development: What Does It Really Mean?
01h 05mHead to Head: Scott Allen and Jon Skeet
25mFive Things I Learned from Dick Karp
