▲ | ltbarcly3 3 days ago | ||||||||||||||||||||||||||||||||||
That is not how hashtables work. Hash tables effectively randomize keys into buckets. Whether there is a hash collision is independent of the workload, and only has to do with the number of entries in the hash table vs the threshold to resize it. This is what I meant by pathological data. If you had weird data that somehow, over and over, got hash tables right up to their fill limit and just stayed there then you would have slightly more collisions than an average use case. However you would have to construct weird data to do this. It wouldn't be "more ingestion". The thing PGO optimized would be individual branches in the hash table code, so for example the branching instruction to see if the key in a bucket is == to the key you are looking for. | |||||||||||||||||||||||||||||||||||
▲ | menaerus 2 days ago | parent [-] | ||||||||||||||||||||||||||||||||||
> Whether there is a hash collision is independent of the workload, In read-only workload, searching through the key-value space there can't be a collision, no? | |||||||||||||||||||||||||||||||||||
|