File: CompatBench.hs

package info (click to toggle)
haskell-unicode-data 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,004 kB
  • sloc: haskell: 26,075; makefile: 3
file content (23 lines) | stat: -rw-r--r-- 605 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Unicode.Char.Numeric.CompatBench
    ( benchmarks
    ) where

import Test.Tasty.Bench ( Benchmark )
import qualified Data.Char as Char

import Unicode.Char.Bench (
    Bench (..),
    CharRange,
    bgroupWithCharRange,
    bgroupWithChars,
 )
import qualified Unicode.Char.Numeric.Compat as NumCompat

{-# NOINLINE benchmarks #-}
benchmarks :: CharRange -> Benchmark
benchmarks r = bgroupWithCharRange "Unicode.Char.Numeric.Compat" r $ \chars ->
    [ bgroupWithChars "isNumber" chars
        [ Bench "base"         Char.isNumber
        , Bench "unicode-data" NumCompat.isNumber
        ]
    ]