Well, I wrote the clojure version after boasting to ninjudd that
deftype would let you do it without writing any java at all. I did
some simple-minded benchmarking, and while I don't recall the exact
numbers his java version is ~10-50% faster. If you look through the
git logs, somewhere I have a version that is only 5% slower than his,
but when I added efficient disjoin support that slowed down the conj
case a bit; we decided that the purity was worth the performance cost.
If you want to resurrect that version, let me know and I'll hunt it
down.

I also have a version with even more-efficient disjoin but it slowed
conjing down to log2(n) instead of log32(n), and that performance hit,
while theoretically nil, was very noticeable in practice.

If I were using this for some performance-critical task and never
disjoined, I'd use ninjudd's version. Otherwise I'd use mine, just
because it's easier to build and tweak since it's in clojure.

On Jun 28, 12:54 pm, Tassilo Horn <tass...@member.fsf.org> wrote:
> Alan Malloy <a...@malloys.org> writes:
>
> Hi Alan,
>
> > ArrayMap isn't very performant for large collections. You might like
> >https://github.com/flatland/ordered
>
> in my clojure app, I totally rely on ordered sets.  Currently, I use
>
>  https://github.com/ninjudd/ordered-set
>
> for which I've implemented transient support which is already
> incorporated and released.  Looking at your code, it basically looks
> identical wrt features, except that your implementation is comletely in
> clojure (and includes maps) while ninjudd's implementation is mainly
> java.
>
> If you know ninjudd's lib, can you give advice in what use-cases you'd
> prefer your own lib?  Basically, in my scenario I only conjoin using
> `into' but never disjoin, and performance for that is very important.
> That's why I've implemented the transient support.  But as it turned
> out, that didn't improve performance significantly, cause the
> calculation of set members is far more expensive than aggregating
> them...
>
> Well, in any case, I think I'll simply try it out at the weekend.
> Hopefully, I'm able to get some totally non-empirical benchmark results
> from my test suite that I can poste here.
>
> Bye,
> Tassilo

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