with generative tests
with examples demonstrating performance
Performance: Details in comments, summary:
Screening note: We could use transients to improve performance of the distinct impl, except checking containment in a transient set is broken per (which is not currently in 1.7). I have a new patch and direction on that could provide a way to solve that if we want to move it back and push this further. Or we could just wait and refactor when does go in.
This can be further improved by using transient set instead of persistent one in distinct:
Only caveat is that transient sets do not support contains? for now (see CLJ-700). This can be solved by using (.contains ^clojure.lang.ITransientSet set key)
I’m not sure what’s the best way to attach patch to this, for now attaching a patch that can be applied on top of Alex changes (clj-1601-transient-distinct.patch).
Hey Nikita, I'd rather fix and use the normal functions rather than what you've done in the patch, which is why I hadn't done this before. I'm waiting to check with Rich whether we'll do that in 1.7 or wait till next release.
1601-3 no longer applies cleanly to master, I've got a reroll that does, is it ok to attach it even though the ticket is marked 'screened'?
Updated tests to apply cleanly to current master in -4 patch.
Ha, didn't see your comment Michael! I was working on the same thing.