On Thursday, October 13, 2016 at 12:23:21 PM UTC-5, Dan wrote:
> Hi
> I would like to be able to take advantage of the tree structures 
> underneath e.g. hash-maps for a faster diff.
> I wrote a gist to do this in clojurescript 
> https://gist.github.com/danjohansson/add5515b2067b3036044d450cbec08f3 
> <https://www.google.com/url?q=https%3A%2F%2Fgist.github.com%2Fdanjohansson%2Fadd5515b2067b3036044d450cbec08f3&sa=D&sntz=1&usg=AFQjCNF2a7z_HTG_N0QBHQVUE9Iu8mhfaA>
> I guess BitmapIndexedNode etc are implementation details of 
> PersistentHashMaps and its a bad idea to use them directly.


> In clojure it is not straightforward to do this at all since root is 
> private.

Should be considered implementation details.

> So to my question:
> Is there or has there been any plans to add a diff or a diff enabler on 
> the data structures to be able to make faster diffs.


It seems like the "right" way to do such a thing would be to create an 
interface/protocol for diffing and extend/implement it on the data 
structures as directly as possible, which seems like the path you're going 

Given the perf diff you demonstrated (would be curious to see how that 
translates to Clojure), might be an interesting enhancement.

Another option would be to look at optimizations for the existing generic 
data diff as well. Might guess is there is probably room for improvement.

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
For more options, visit this group at
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/d/optout.

Reply via email to