Since the latest PHM patch has now been merged to master (thanks,
David!), I wanted to take this opportunity to note that porting all
that Java code (including the transient support for PHM -- a working
version of which is available for testing in its own ticket [1] -- and
now the PersistentTreeMap [2]) has been completely smooth sailing.
Some additions have been made to the implementation to improve
performance while maintaining clarity of the code (here some excellent
suggestions from David were very helpful), but the initial
implementation already worked without them and client code could
absolutely replicate them (by providing the requisite compiler macros
in its own namespace). It's not that I expected insurmountable
difficulties, but experiencing just how complete ClojureScript already
is in the context of this sort of non-trivial data structure
implementation task has been amazing.

For those interested in how PHM's performance compares to that of the
previously used ObjMap and HashMap copy-on-write implementations,
there are some jsPerf tests linked to from the ticket [3]. There's
also a TransientHM vs. PHM comparison linked to from [2].

Sincerely,
Michał


[1] http://dev.clojure.org/jira/browse/CLJS-181
[2] http://dev.clojure.org/jira/browse/CLJS-187
[3] http://dev.clojure.org/jira/browse/CLJS-178


On 16 April 2012 20:15, David Nolen <dnolen.li...@gmail.com> wrote:
> Thanks to Michal Marczyk we're closing in on PersistentHashMaps:
>
> http://jsperf.com/cljs-persistent-hash-map-tiny-assoc
> http://jsperf.com/cljs-persistent-hash-map-large-assoc
> http://jsperf.com/cljs-persistent-hash-map-access
>
> Performance is looking pretty good and, as usual, very stellar on V8.
>
> David
>
> --
> You received this message because you are subscribed to the Google Groups
> "Clojure Dev" group.
> To post to this group, send email to clojure-...@googlegroups.com.
> To unsubscribe from this group, send email to
> clojure-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/clojure-dev?hl=en.

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to