Comment made by: alexmiller
I agree that would be a nice thing to say without qualification.
There is a real cost to adding more branches in hasheq - adding those collection checks affects every hasheq. Running a full Clojure build, I see the following set of classes with >100 occurences where this happens (note that exactly 0 of these are the Java collections - this case doesn't exist in the Clojure build itself):
clojure.lang.Var 107001502
java.lang.Class 2651389
java.lang.Character 2076322
java.util.UUID 435235
java.util.Date 430956
clojure.lang.Compiler$LocalBinding 116830
java.lang.Boolean 112361
java.util.regex.Pattern 325
We'd be adding 4 more instanceof checks in the path of every one of those hasheqs. This would also likely blow any JVM inlining.
Rich says "all bets should be off for hasheq/equiv of non-values" where Java collections obviously fall into the class of "non-values".