Use char '-' >> char '-' instead of string in comment
The latter appears to do a rather heavy string comparison.
commit4678ed2d403aaa55c5d1b873c8b3a9f65c64bcdc
authorBen Gamari <ben@smart-cactus.org>
dateFri 2 Feb 2018, 20:55 (9 years ago)
parent98e2567
Text/HTML/Parser.hs+1−1
@@ -245,7 +245,7 @@ markupDeclOpen =
245245 <|> try docType
246246 <|> bogusComment mempty
247247 where
248− comment_ = string "--" >> commentStart
248+ comment_ = char '-' >> char '-' >> commentStart
249249 docType = do
250250 -- switching this to asciiCI slowed things down by a factor of two
251251 s <- take 7