Hacker News new | ask | show | jobs
by londons_explore 980 days ago
Presumably there is some way to use the hash of the actual key as the key, and then store both key and value as data?

16 bytes is long enough that collisions will be super rare, and while you obviously need to write code to support that case, it should have no performance impact.

1 comments

A 32-byte key would allow using NVMe KV directly for content-addressed storage; many of those systems use 256-bit / 32-byte cryptographic hashes as keys. Notable exception would be git with 20-byte keys.
You can still do this... Just use the first 16 bytes as the key, and the 2nd 16 bytes as the start of the data.