Comment

Comment by lqdc13

The grep one is tricky. If no characters match, it's fast.

But if some match, and if it is ignoring case, it's much slower. It's actually faster to read the whole file into memory, lowercase it and check with python for index of match.

parent lqdc13 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton