I mean: 1) if you cache your hashes, 2) they have the 'right' properties to provide enough collision resistance that statistically speaking, there's no need to worry about dupes, then it can make sense to compare hashes for a value comparison. But for that to be true, your hash function has to output at least 128 bits, and either be cryptographic, or else you have to be willing to assume people can intentionally force collisions, and then you should still be using something off the shelf like xxh-128