https://github.com/jbaron/htmlscanner C++ implementation, claims to be fast. It doesn't look like it would be too hard to hook this into jsdom.