1import Control.Monad (replicateM)
2import Control.Parallel.Strategies
5import Data.Maybe (fromJust)
7import qualified Data.ByteString.Lazy as BL
8import qualified Data.ByteString.Lazy.Internal as BL
9import qualified Data.UUID as U
10import qualified Data.UUID.Internal as U
11import qualified Data.UUID.V1 as U
12import qualified Data.UUID.V5 as U
16instance NFData BL.ByteString where
18 rnf (BL.Chunk _ ts) = rnf ts
20instance NFData U.UUID where
21 rnf (U.UUID tl tm th ch cl node) =
22 rnf tl `seq` rnf tm `seq` rnf th `seq` rnf ch `seq` rnf cl `seq` rnf node
24instance NFData U.Node where
25 rnf (U.Node w1 w2 w3 w4 w5 w6) =
26 rnf w1 `seq` rnf w2 `seq` rnf w3 `seq` rnf w4 `seq` rnf w5 `seq` rnf w6
33 let s1 = U.toString u1
34 b1 = U.toByteString u1
35 n1 = (map (fromIntegral . ord) "http://www.haskell.org/") :: [Word8]
38 bench "null" $ whnf U.null u1,
39 bench "null nil" $ whnf U.null U.nil
42 bench "toString" $ nf U.toString u1,
43 bench "fromString" $ nf U.fromString s1,
44 bench "toByteString" $ nf U.toByteString u1,
45 bench "fromByteString" $ nf U.fromByteString b1
48 bench "V1" $ nfIO U.nextUUID,
49 bench "V4" $ nfIO (randomIO :: IO U.UUID),
50 bench "V5" $ nf (U.generateNamed U.namespaceURL) n1
54#if !(MIN_VERSION_criterion(0,4,0))
55nf f arg = B ( rnf . f) arg
59#if !(MIN_VERSION_criterion(0,4,1))
60nfIO act = rnf `fmap` act
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list