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" $ B U.null u1,
39 bench "null nil" $ B U.null U.nil
42 bench "toString" $ B (rnf . U.toString) u1,
43 bench "fromString" $ B (rnf . U.fromString) s1,
44 bench "toByteString" $ B (rnf . U.toByteString) u1,
45 bench "fromByteString" $ B (rnf . U.fromByteString) b1
48 bench "V1" $ rnf `fmap` U.nextUUID,
49 bench "V4" $ rnf `fmap` (randomIO :: IO U.UUID),
50 bench "V5" $ B (rnf . U.generateNamed U.namespaceURL) n1
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