On 10.12.12 09:48, Christian Heimes wrote: > On the other hand every lookup and collision checks needs an additional > multiplication, addition and pointer dereferencing: > > entry = entries_baseaddr + sizeof(PyDictKeyEntry) * idx I think that main slowdown will be in getting index from array with variable size of elements. It requires conditional jump which is not such cheap as additional or shifting. switch (self->index_size) { case 1: idx = ((uint8_t *)self->indices)[i]; break; case 2: idx = ((uint16_t *)self->indices)[i]; break; ... } I think that variable-size indices don't worth effort.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4