Only calculate size of a dynamic table entry once#129
Only calculate size of a dynamic table entry once#129sethmlarson wants to merge 3 commits intomasterfrom
Conversation
|
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 |
Lukasa
left a comment
There was a problem hiding this comment.
Yeah, so I think this isn't a breaking change: we don't expect people to be messing about with this data structure. Changelog entry would be good though!
|
Sure thing, I was about to ask you whether we expect people to mess around with I'll have to change a lot of tests that seem to be touching |
f30c334 to
0d85f75
Compare
|
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. |
| if v == value: | ||
| return i + 1, n, v | ||
| elif partial is None: | ||
| partial = (i + 1, n, None) |
There was a problem hiding this comment.
Looks like you accidentally included a reversion to the old lookup style.
There was a problem hiding this comment.
I think this is from where I mucked up a rebase from 119. I'm probably going to just restart with master since the change is so minor.
Optimization to reduce the number of calls to
table_entry_sizeby half when adding and evicting entries to the dynamic table so the size of an entry is only calculated onadd().