-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance comparison? #13
Comments
After a bit of experimentation, I realized that I misunderstood 'dependently typed finite maps'. I was looking for somehow specifying type constraints between keys and values in a map. data CacheKey k where
CKFoo :: Int -> CacheKey Index
CKBar :: Text -> CacheKey Content Then, for arbitrary values of |
I have not measured performance, but the underlying implementation started as a direct copy of As for the functionality, unless I'm misunderstanding, it does exactly what you're asking. A |
Ah, sorry I read the types in your GADT too quickly so my examples for the entries that you can store are wrong, but the gist is correct. Better example entries would be |
See also the |
Hmm. I had trouble writing the instance GEq CacheKey where
geq (CKFoo i1) (CKFoo i2) = ? |
How does this compare to
Map
from containers andHashMap
from unordered-containers in terms of performance?The text was updated successfully, but these errors were encountered: