I see how changing the hash function for vectors/records/maps would be useful, because if their hash values were more widely distributed, then adding up those hash values would be less likely to yield the same sum. But wouldn't the simplest solution be to change the hashing strategy for sets to be something more complicated than a sum?
On Wed, Oct 23, 2013 at 11:44 AM, Michael Gardner <gardne...@gmail.com>wrote: > On Oct 23, 2013, at 12:30 , Andy Fingerhut <andy.finger...@gmail.com> > wrote: > > > If you can think of a different hash function for vectors that doesn't > lead to these types of collisions, I'm all ears. The issue is that the > hash function for sets adds up the hash values of its elements. Those sums > of vector hash values are what are colliding, not the individual vector > hash values themselves. > > What about the formula used by Boost's hash_combine? > > > http://stackoverflow.com/questions/4948780/magic-number-in-boosthash-combine > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.