~/talk

O(n) Lost to O(n log n): Your Algorithm Didn’t Choose the CPU It Runs On

TalkinRussianat HardFest 2026 · on Saturday, 2026-10-17· [linux-and-operating-systems]
links:none on file
slides:none on file

A C++20 performance study explains why an O(n) deduplication algorithm can lose to an O(n log n) sort-based approach because real runtime depends on caches, allocations, data layout and which CPU core the OS schedules the process on. The talk runs the same code on x86-64, Apple Silicon and mobile ARM64 to show how contiguous memory (sort + unique), hash-table implementation details, core type/frequency and thermal throttling change the crossover point where one algorithm outperforms another.

AI-written summary · about

  1. 0:00Introduction
  2. 1:50Problem statement
  3. 3:56Algorithm theory
  4. 6:24Unexpected results
  5. 8:32CPU execution
  6. 10:38Command analysis
  7. 13:02Memory access
  8. 15:09Branch prediction
  9. 16:54Hash table fix
  10. 18:40Input size impact
  11. 20:02Benchmarking pitfalls
  12. 21:04OS core selection
  13. 23:10Performance summary
  14. 24:14Code review
  15. 25:45Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.