> things might be bad if we want do dedup RexNode children using Set<RexNode>
I guess the following might work better than XOR: a) compute xor of the hashes b) compute sum of the hashes c) compute product of the hashes (with 0 replaced by 1 to avoid 0*n=0) Then combine the three values somehow. For instance: (a*17+b)*17+c That would result in a hash code that tolerates item reordering, it is better than XOR, and it should be fast. Unfortunately, we can't use the improved function in Pair since Map.Entry specifies the exact computation formula :-/ Vladimir