@@ -2,12 +2,12 @@
22
33[](https://hackage.haskell.org/package/typerep-map)
44[](https://travis-ci.org/kowainik/typerep-map)
5−[](http://stackage.org/lts/package/typerep-map)
6−[](http://stackage.org/nightly/package/typerep-map)
75[](https://github.com/vrom911/typerep-map/blob/master/LICENSE)
86
97`typerep-map` introduces `TypeRepMap` — data structure like [`Map`](http://hackage.haskell.org/package/containers-0.6.0.1/docs/Data-Map-Lazy.html#t:Map), but where types serve as keys, and values have the types specified in the corresponding key spots.
108
9+## Usage example
10+
1111```haskell
1212ghci> let typeRepMap = insert (Identity True) $ one (Identity (42 :: Int))
1313
@@ -36,3 +36,18 @@ ghci> let trMap = delete @Int typeRepMap
3636ghci> member @Int trMap
3737False
3838```
39+
40+## Benchmarks
41+
42+Tables below contain comparision with `DMap TypeRep` of ten `lookup` operations
43+on structure with size `10^4`:
44+
45+| | ghc-8.2.2 | ghc-8.4.3 |
46+|----------------|-----------|-----------|
47+| `DMap TypeRep` | 517.5 ns | 779.9 ns |
48+| `typerep-map` | 205.3 ns | 187.2 ns |
49+
50+ ghc-8.2.2 | ghc-8.4.3
51+:---------:|:-----------:
52+ | 
53+ | 