Commit f77957a9 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢

bench: Add benchmark for hex parser

parent 597e0def
......@@ -16,6 +16,7 @@ benchmarks = bgroup "Copar.Parser.Lexer"
[ benchColon
, benchDecimal
, benchFloat
, benchHex
, benchName
, benchWhitespace
]
......@@ -40,6 +41,12 @@ benchFloat = bgroup "float"
, benchp @Double "signed" (L.signed L.float) "2.87182364"
]
benchHex :: Benchmark
benchHex = bgroup "hex"
[ benchp @Int "single" L.hex "0x1"
, benchp @Int "many" L.hex "0x123456789ABCDEF"
]
benchName :: Benchmark
benchName = bgroup "name"
[ benchp "one letter" L.name "a"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment