Skip to content

Comment on Why GNU grep is Fastparent

Comments

Searching for "b" in "ab". Just two comparisons, compared to allocating, zeroing, and initializing a lookup table, and then doing a brute force search anyways. There's a fuzzy point where one becomes better than the other. Implementations written to be fast may brute-force length=1 strings, and implementations written for simplicity may not.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.