1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
module Unicode.Char.IdentifiersBench
( benchmarks
) where
import Test.Tasty.Bench (Benchmark)
import Unicode.Char.Bench (
Bench (..),
CharRange,
bgroupWithCharRange,
bgroupWithChars,
)
import qualified Unicode.Char.Identifiers as I
{-# NOINLINE benchmarks #-}
benchmarks :: CharRange -> Benchmark
benchmarks r = bgroupWithCharRange "Unicode.Char.Identifiers" r $ \chars ->
[ bgroupWithChars "isIDContinue" chars
[ Bench "unicode-data" I.isIDContinue
]
, bgroupWithChars "isIDStart" chars
[ Bench "unicode-data" I.isIDStart
]
, bgroupWithChars "isXIDContinue" chars
[ Bench "unicode-data" I.isXIDContinue
]
, bgroupWithChars "isXIDStart" chars
[ Bench "unicode-data" I.isXIDStart
]
, bgroupWithChars "isPatternSyntax" chars
[ Bench "unicode-data" I.isPatternSyntax
]
, bgroupWithChars "isPatternWhitespace" chars
[ Bench "unicode-data" I.isPatternWhitespace
]
]
|