enhancement - use a faster hash function for lyht_hash_multi
Is it possible to switch to a faster hash function such as xxhash or similar?
The current implementation of lyht_hash_multi() uses one-at-a-time hash, which may not be the best.
Sure, if you know about a faster hash function, you can measure it and if it performs better, it can be used.
Is it okay to add a dependency to libxxhash-dev or would you prefer to keep the code within libyang, such as xxhash32-ref.c
Seems the package is widely available so it may be fine to keep it as a dependency. But I would like to see some libyang benchmarks before using it.
Created PR here. Do you have anything specific that you would like to test against for benchmarking?
Maybe just 2 basic use-cases, context creation (dictionary hashes) and data tree creation (node hashes). Also, you may want to check what functions to use exactly because our hash function returns uint32_t so 64b hash is redundant.
From the documentation in xxhash.h, it seems like it is okay to XXH3_64bits.
* XXH32 is useful for older platforms, with no or poor 64-bit performance.
* Note that @ref xxh3_family provides competitive speed
* for both 32-bit and 64-bit systems, and offers true 64/128 bit hash results.