Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The musl timings are actually incorrect, because it resets the timer on each iteration of the main loop used to count matches. So you only record the time to make the last match, not the total time. I've raised an issue on the GitHub for smart.



Oh, oh, thanks!


I was surprised that an algorithm from 1991 was the fastest! My first rule of benchmarking is to be suspicious of surprises!


Yes, I updated the benchmarks of the best string search algos.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: