Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ coverage:
status:
patch:
runtime:
target: 100%
target: 95%
flags:
- pytest
typing:
Expand All @@ -30,7 +30,7 @@ coverage:
- pytest
paths:
- multidict/
target: 100%
target: 95%
tests:
flags:
- pytest
Expand Down
10 changes: 10 additions & 0 deletions CHANGES/1128.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Replace internal implementation from an array of items to hash table.
algorithmic complexity for lookups is switched from O(N) to O(1).

The hash table is very similar to :class:`dict` from CPython but it allows keys duplication.

The benchmark shows 25-50% boost for single lookups, x2-x3 for bulk updates, and x20 for
some multidict view operations. The gain is not for free:
:class:`~multidict.MultiDict.add` and :class:`~multidict.MultiDict.extend` are 25-50%
slower now. We consider it as acceptable because the lookup is much more common
operation that addition for the library domain.
Loading
Loading