Skip to content

Commit 3b2f7a0

Browse files
authored
Merge pull request #181 from purescript-contrib/benchrec4
Add sepEndBy1, sepEndBy1Rec to benchmarks
2 parents caad792 + 14e1824 commit 3b2f7a0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bench/Main.purs

+7-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import Effect.Console (log)
7070
import Effect.Exception (throw)
7171
import Effect.Unsafe (unsafePerformEffect)
7272
import Parsing (Parser, runParser)
73-
import Parsing.Combinators (chainl, chainlRec, chainr, chainrRec, manyTill, manyTillRec, manyTillRec_, manyTill_, sepBy, sepByRec)
73+
import Parsing.Combinators (chainl, chainlRec, chainr, chainrRec, manyTill, manyTillRec, manyTillRec_, manyTill_, sepBy, sepByRec, sepEndBy1, sepEndBy1Rec)
7474
import Parsing.String (anyChar, char, eof, string)
7575
import Parsing.String.Basic (digit)
7676
import Performance.Minibench (benchWith)
@@ -196,6 +196,12 @@ main = do
196196
htmlTableWrap "runParser sepByRec 10000" $ benchWith 50
197197
$ \_ -> throwLeft $ runParser string23_10000 $ sepByRec anyChar (pure unit)
198198

199+
log "<th><h2>sepEndBy1 10000</h2></th>"
200+
htmlTableWrap "runParser sepEndBy1 10000" $ benchWith 50
201+
$ \_ -> throwLeft $ runParser string23_10000 $ sepEndBy1 anyChar (pure unit)
202+
htmlTableWrap "runParser sepEndBy1Rec 10000" $ benchWith 50
203+
$ \_ -> throwLeft $ runParser string23_10000 $ sepEndBy1Rec anyChar (pure unit)
204+
199205
log "<th><h2>chainl 10000</h2></th>"
200206
htmlTableWrap "runParser chainl 10000" $ benchWith 50
201207
$ \_ -> throwLeft $ runParser string23_10000 $ chainl anyChar (pure const) 'x'

0 commit comments

Comments
 (0)