Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reimplement find_bm() using std::search
Use std::search() to implement find_bm() instead of using a local implementation of Boyer-Moore. Avoids integer overflow reported in issue tat#31 and PR tat#31. Should fix build problem in issue tat#7. std::search is also faster for the test program in issue tat#31 on a system with an Intel Xeon E-2224 CPU: - gcc 8.5, find_bm(): 3.16s - g++ 8.5, std::search: 2.40s - g++ 13, std::search: 2.16s Experiments using the C++17 std::boyer_moore_searcher or std::boyer_moore_horspool_searcher were also slower than std::search in this experiment.
- Loading branch information