Closed sethmlarson closed 5 years ago
This seems like it would be a breaking change, perhaps this should be bundled up into work to improve the dynamic table lookup speed. Potentially can use a helper object to preserve outward API.
Might write a subclass to deque
that handles all shrinking/growing along with preserving public API.
Sure thing, I was about to ask you whether we expect people to mess around with dynamic_entries
. I've also got an idea that could bring down our name, value -> index
look-up time from O(N) to O(1) while keeping memory usage linear relative to current usage.
I'll have to change a lot of tests that seem to be touching dynamic_entries
to make them pass.
My idea to reduce lookup time has too much of a memory usage trade-off. Will take the simple route here, just need to fix some tests.
Optimization to reduce the number of calls to
table_entry_size
by half when adding and evicting entries to the dynamic table so the size of an entry is only calculated onadd()
.