qkreltms / react-action-listener

Middleware, React hook which allows making side effect and listening actions of Context or Redux
MIT License
9 stars 0 forks source link

feat: Implement hash table to reduce time complexity #46

Closed qkreltms closed 3 years ago

qkreltms commented 3 years ago

Is your feature request related to a problem? Please describe. Currently we use unique hash key when adding listeners and search array for O(n) and find type(action name) == target. We can reduce time complexity by implementing hash table for O(1), but when we have hash collapsing then for O(n)

Describe the solution you'd like Implementing hash table and hash collapsing.