Filter before running computationally expensive tasks

from blog James' Coffee Blog, | ↗ original
In “Regular Expression Matching with a Trigram Index or How Google Code Search Worked”, Russ Cox describes a system that allows for code search with regular expressions. It has taken me several reads of the article to understand roughly what is going on, and I still don’t have a full understanding. With that said, there is one pattern that stands...