On Mar 29, 10:21 pm, Krukow <karl.kru...@gmail.com> wrote:
> Hello,
[snip..]
> What was surprising to me wasn't that "inserts" are slower - that is
> ok and it could be improved with transients. The surprising thing was
> that iterating through the entire set was significantly slower.
[snip..]

I've dug through the source, and to answer my own question: The 10x
slowdown occurred only in the first iteration through the set. It
turns out the PersistentHashSet (and others) calls RT which caused the
clojure runtime to load costing about two seconds. Once the runtime is
loaded it is 1-4 time java.util.HashSet for iteration which is fine.

It would be nice to have a version of the clojure data structures
which doesn't depend on the runtime. I may start extracting such a
version myself.

/Karl

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to