Daniel-Constantin Mierla wrote:
could be possible to do this way, but the number of slots has to be initialized at startup. Unlike in other cases, here the hash table is in shared memory, each slot being protected by a mutex to prevent access conflicts.
While it would be nice to have the table dynamically resize itself at runtime, it is not necessary. All I was suggesting was a wrapper around the process of iterating through a serialised data structure and re-hashing the keys=>values. The table can still be fixed-size. It's really just serialisation/deserialisation that is the essence of the request.
Setting the size on the deserialising end in a way appropriate to the required performance characteristics can still be up to the user.
Might be better to create a issue on the tracker collecting these ideas -- as time allows, somebody may contribute.
Will do. Is the htable code fairly simple? I might contribute.