Re: ClojureScript assoc performance

2012-02-15 Thread Takahiro
Timothy It seems that HashMap also clones whole. https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs#L2371 David I see. I guessed that overhead of persistent data structure might be considered. Thanks. 2012/2/16 Timothy Baldridge : >>Is this design choice intended for so

Re: ClojureScript assoc performance

2012-02-15 Thread David Nolen
It is intended, copy-on-write. No one has yet attempted persistent data structures for ClojureScript. Until then I think transient versions of the current data structures might be useful if someone is willing to contribute them. David On Wed, Feb 15, 2012 at 1:24 PM, Takahiro Hozumi wrote: > Hi

Re: ClojureScript assoc performance

2012-02-15 Thread Timothy Baldridge
>Is this design choice intended for some reason? Maybe you should try using a Hashmap? https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs#L2322 -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful term

ClojureScript assoc performance

2012-02-15 Thread Takahiro Hozumi
Hi, I found that assoc can be slow in ClojureScript. This is my app profile. http://twitpic.com/8kbupv/full I think the cause is that entire clone happen when assoc is called. https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs#L2284 Is this design choice intended for som