|
|
|
|
|
by zond
4886 days ago
|
|
> why do you care about how the data is actually stored? I just said I don't. 'god does not force the user to hash the keys'. > > To map keys to values, a mapping structure is needed. For infrastructural reasons (synchronization and cleaning) as well as for functionality of different kinds, we need a sorted mapping, and it has to be deterministically structured. > why? Functionality: To be able to return the first or the n'th entry it has to be ordered. Synchronization/cleaning: To be able to hash element 0000-000f we need an efficient way to fetch a segment of elements, thus it again has to be ordered. To optimize the hashing so that I don't have to keep two separate data structures I keep the hashes in the nodes of the sorted data structure. Thus the structure has to be deterministically structured or the hashes won't be equal even if the trees contain the same data. |
|