[CRIU] [PATCH 28/28] rst: replace binary tree for files with
hash table
Kinsbursky Stanislav
skinsbursky at openvz.org
Fri Mar 23 04:05:48 EDT 2012
22.03.2012 23:39, Andrew Vagin пишет:
> Without an commit message I can not understand why you decided to do that.
>
> The difficulty of searching in binary tree is log(n).
> The difficulty of searching in hash table is n/HASH_TABLE_SIZE
>
> For example if n=1024
> log(n)=10, but n/n/HASH_TABLE_SIZE=32...
>
> Pls, add more details.
My idea was to use the same code base for dumping and restoring of files.
Pavel believes, that on restore hash table is faster (if table has size big
enough and function is good).
So the hash table itself is not my idea. But implementation is straight-forward
and thus not optimal.
This patch just replaces tree with hash function. It can be dropped or rewritten.
--
Best regards,
Stanislav Kinsbursky
More information about the CRIU
mailing list