Finding Strings in Large Files
summary
Search of gigabytes of mostly-binary files with very few partial matches is faster with heuristics than with naive std::search: a Boyer‑Moore‑Horspool style skip table leaps over most bytes and cuts a 500 MB run from ~900 ms to much less. Further speed comes from a handwritten SIMD assembly version that compares large blocks at once and drops runtimes to ~300 ms, becoming memory‑throughput bound; tradeoffs are lost easy portability, more complex handling of overlapping partial matches, and the need for platform‑specific assembly.
AI-written summary · about
chapters (3)
related talks
05mLightning Talk: Searching with C++ - A Fulltext Index Search Algorithm
47mFantastic Algorithms and Where To Find Them
01h 24mOptimising a small real-world C++ application
49mAlgorithmic and microarchitecture optimizations of C++ applications
01h 17mWhat Do You Mean by "Cache Friendly"?
45mPerformance Benchmarking with Celero
13mMissing Optimizations on Node-based Containers
35mAlgorithmic and microarchitecture optimizations of C++ applications
