RST reader: recouped speed loss due to addition of --smart.
This was achieved by rearranging the parsers in inline.
Benchmarks went from 500ms to 307ms -- not quite back to the
279ms we had in 1.6, before supporting smart punctuation and
footnotes, but close.
commitbbad12906632291d146a8ad634309a689c3b46af
authorJohn MacFarlane <jgm@berkeley.edu>
dateWed 22 Dec 2010, 15:10 (16 years ago)
parent4ba3afb
src/Text/Pandoc/Readers/RST.hs+4−4
@@ -709,8 +709,7 @@ table = gridTable False <|> simpleTable False <|>
709709 --
710710
711711inline :: GenParser Char ParserState Inline
712−inline = choice [ smartPunctuation inline
713− , link
712+inline = choice [ link
714713 , str
715714 , whitespace
716715 , endline
@@ -718,11 +717,12 @@ inline = choice [ smartPunctuation inline
718717 , emph
719718 , code
720719 , image
721− , hyphens
722720 , superscript
723721 , subscript
724− , escapedChar
725722 , note
723+ , smartPunctuation inline
724+ , hyphens
725+ , escapedChar
726726 , symbol ] <?> "inline"
727727
728728hyphens :: GenParser Char ParserState Inline