One caveat: I do like the fact that the set operations currently don't
require the second argument to be a set. In the case that it's not, I
believe the current implementations (at least for difference) are as
good as it gets.
So, I guess fast-difference should read:
(defn fast-difference "Like difference, but faster." [s1 s2]
(if (or (not (set? s2))
(> (int (count s1)) (int (count s2))))
(clojure.set/difference s1 s2)
(difference2 s1 s2)))
-Jason
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---