kangax/html-minifier — pull request #252 by duncanbeevers (2014-09-02 13:14:39+00:00)
Title: Short-circuit corpus scan

Huge speed-ups by not scanning the entire html corpus when we only care about the beginning few characters.

Previously, the wikipedia benchmark was coming in around 7 seconds on my machine. With this change, it takes about 2 and a half seconds.