Hacker News new | past | comments | ask | show | jobs | submit login

The replacement algorithm: http://0x80.pl/articles/simd-strfind.html#algorithm-1-generi... (basically, match the first and last character and extract possible candidates using vector predicates)

The original algorithm by comparison was doing IndexOf for the first character then match the rest naively and was very slow even compared to strstr and std::string::find compared in the Wojciech Muła's page.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: