mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +00:00
The current algorithm is currently O(N^2) because we forward-search an ever-increasing substring of the haystack. This implementation reduces the search time of a 500,000-length string (where the desired needle is at index 0) from 72 seconds to 2-3 milliseconds.
19 KiB
19 KiB