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.
This commit is contained in:
parent
4ba3afbb4d
commit
bbad129066
1 changed files with 4 additions and 4 deletions
|
@ -709,8 +709,7 @@ table = gridTable False <|> simpleTable False <|>
|
|||
--
|
||||
|
||||
inline :: GenParser Char ParserState Inline
|
||||
inline = choice [ smartPunctuation inline
|
||||
, link
|
||||
inline = choice [ link
|
||||
, str
|
||||
, whitespace
|
||||
, endline
|
||||
|
@ -718,11 +717,12 @@ inline = choice [ smartPunctuation inline
|
|||
, emph
|
||||
, code
|
||||
, image
|
||||
, hyphens
|
||||
, superscript
|
||||
, subscript
|
||||
, escapedChar
|
||||
, note
|
||||
, smartPunctuation inline
|
||||
, hyphens
|
||||
, escapedChar
|
||||
, symbol ] <?> "inline"
|
||||
|
||||
hyphens :: GenParser Char ParserState Inline
|
||||
|
|
Loading…
Add table
Reference in a new issue