All Projects → kowainik → Typerep Map

kowainik / Typerep Map

Licence: mpl-2.0
⚡️Efficient implementation of Map with types as keys

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Typerep Map

Pokeapi Js Wrapper
PokeAPI browser wrapper, fully async with built-in cache
Stars: ✭ 129 (+51.76%)
Mutual labels:  hacktoberfest, cache
Layercache
Caching made simple for Android and Java.
Stars: ✭ 155 (+82.35%)
Mutual labels:  hacktoberfest, cache
Lru Cache Node
A lighting fast cache manager for node with least-recently-used policy.
Stars: ✭ 120 (+41.18%)
Mutual labels:  hacktoberfest, cache
Drone Cache
A Drone plugin for caching current workspace files between builds to reduce your build times
Stars: ✭ 194 (+128.24%)
Mutual labels:  hacktoberfest, cache
Bigcache
Efficient cache for gigabytes of data written in Go.
Stars: ✭ 5,304 (+6140%)
Mutual labels:  hacktoberfest, cache
Offix
GraphQL Offline Client and Server
Stars: ✭ 694 (+716.47%)
Mutual labels:  hacktoberfest, cache
Strapi Middleware Cache
🔌 A cache middleware for https://strapi.io
Stars: ✭ 146 (+71.76%)
Mutual labels:  hacktoberfest, cache
Kinto.js
An Offline-First JavaScript Client for Kinto.
Stars: ✭ 268 (+215.29%)
Mutual labels:  hacktoberfest, cache
Memento
Memento is a development-only tool that caches HTTP calls once they have been executed.
Stars: ✭ 380 (+347.06%)
Mutual labels:  hacktoberfest, cache
React Esi
React ESI: Blazing-fast Server-Side Rendering for React and Next.js
Stars: ✭ 537 (+531.76%)
Mutual labels:  hacktoberfest, cache
Hazelcast Hibernate
A distributed second-level cache for Hibernate
Stars: ✭ 24 (-71.76%)
Mutual labels:  hacktoberfest, cache
Cultofthepartyparrot.com
PARTY OR DIE
Stars: ✭ 1,254 (+1375.29%)
Mutual labels:  hacktoberfest
Applications Menu
Applications Menu for elementary OS and the Pantheon desktop environment
Stars: ✭ 84 (-1.18%)
Mutual labels:  hacktoberfest
Ngx Indexed Db
A service that wraps IndexedDB database in an Angular service. It exposes very simple observables API to enable the usage of IndexedDB without most of it plumbing.
Stars: ✭ 84 (-1.18%)
Mutual labels:  hacktoberfest
Cascade
Dart-like cascade expressions in Rust
Stars: ✭ 84 (-1.18%)
Mutual labels:  hacktoberfest
Awesome Visjs
🕶️ A curated list of resources around vis.js
Stars: ✭ 85 (+0%)
Mutual labels:  hacktoberfest
Azuracast
A self-hosted web radio management suite, including turnkey installer tools for the full radio software stack and a modern, easy-to-use web app to manage your stations.
Stars: ✭ 1,253 (+1374.12%)
Mutual labels:  hacktoberfest
Awesome Laravel Zero
👋 START HERE! A curated list of Laravel Zero libraries, resources and projects
Stars: ✭ 84 (-1.18%)
Mutual labels:  hacktoberfest
React Dashboard Design
⚡️ Implement of Vercel's Dashboard design in React
Stars: ✭ 83 (-2.35%)
Mutual labels:  hacktoberfest
Ritchie Formulas
This repository contains the community formulas that can be executed through Ritchie CLI once imported. This tool is an open source product that allows you to create, store and share any kind of automations, executing them through command lines, to run operations or start workflows ⚙️ 🖥 💡
Stars: ✭ 84 (-1.18%)
Mutual labels:  hacktoberfest

typerep-map

logo

GitHub CI Build status Windows build status Hackage Stackage LTS Stackage Nightly MPL-2.0 license

typerep-map introduces TMap and TypeRepMap — data structures like Map, but where types serve as keys, and values have the types specified in the corresponding key spots.

For the more details on the implementation see the following blog post:

Usage example

ghci> import Data.TMap

ghci> tm = insert True $ one (42 :: Int)

ghci> size tm
2

ghci> res = lookup tm

ghci> res :: Maybe Int
Just 42

ghci> res :: Maybe Bool
Just True

ghci> res :: Maybe String
Nothing

ghci> lookup (insert "hello" tm) :: Maybe String
Just "hello"

ghci> member @Int tm
True

ghci> tm' = delete @Int tm

ghci> member @Int tm'
False

Benchmarks

Tables below contain comparision with DMap TypeRep of ten lookup operations on structure with size 10^4:

ghc-8.2.2 ghc-8.4.3 ghc-8.8.3 ghc-8.10.1
DMap TypeRep 517.5 ns 779.9 ns 1.559 μs 1.786 μs
typerep-map 205.3 ns 187.2 ns 190.1 ns 169.1 ns
ghc-8.2.2 ghc-8.4.3
DMap 8.2.2 DMap 8.4.3
TMap 8.2.2 TMap 8.4.3
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].