transducer arities for map-indexed, distinct, and interpose

Description

  • with generative tests

  • with examples demonstrating performance

Performance: Details in comments, summary:

Patch: clj-1601-4.patch

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.

Screened by:

Environment

None

Attachments

5

Activity

Show:

Alex Miller January 9, 2015 at 4:33 PM

Ha, didn't see your comment Michael! I was working on the same thing.

Alex Miller January 9, 2015 at 4:27 PM

Updated tests to apply cleanly to current master in -4 patch.

Michael Blume January 9, 2015 at 4:23 PM

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'?

Alex Miller December 22, 2014 at 2:32 PM

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.

Nikita Prokopov December 21, 2014 at 12:13 PM

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).

Completed

Details

Assignee

Reporter

Approval

Ok

Patch

Code and Test

Priority

Fix versions

Created November 25, 2014 at 4:12 PM
Updated January 9, 2015 at 8:10 PM
Resolved January 9, 2015 at 8:10 PM