Why no rrbt-based vector in Clojure?

172 views
Skip to first unread message

Robin Heggelund Hansen

unread,
Jul 30, 2016, 5:29:23 AM7/30/16
to Clojure Dev
I'm currently working on implementing Relaxed Radix B-Trees for Elm, and I find myself wondering why Clojure doesn't have an rrbt implementation in its core library. After all, it promises the same performance for all other operations than append and slice, where it offers an order of magnitude improvement.

Am I missing something?

Does rrbt have any downsides I'm not aware of compared to Clojure's current PersistentVector, or just hasn't there been any particular interest in (effectively) constant time append and slice?

Thanks!

Colin Fleming

unread,
Jul 30, 2016, 6:30:56 AM7/30/16
to cloju...@googlegroups.com
There is https://github.com/clojure/core.rrb-vector - I think this is what you're looking for? It's a core library but it's obviously not shipped as the default vector implementation - I'm not sure what the tradeoffs are there. According to the doc it's very interoperable with the stock vectors though.

--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev...@googlegroups.com.
To post to this group, send email to cloju...@googlegroups.com.
Visit this group at https://groups.google.com/group/clojure-dev.
For more options, visit https://groups.google.com/d/optout.

Robin Heggelund Hansen

unread,
Jul 30, 2016, 10:43:27 AM7/30/16
to Clojure Dev
I should've been more clear, sorry.

I did find that repo, but I guess my question is, why isn't this the default, or why isn't the native Java code re-written to implement an rrbt based vector for Clojure? My understanding of rrbt is that the only difference between rrbt and Clojure's persistent vector is better append and slice performance. So i'm curious if there are some tradeoffs that I'm not aware about.

Robin Heggelund Hansen

unread,
Jul 30, 2016, 10:45:01 AM7/30/16
to Clojure Dev
I also want to stress that this isn't criticism of any kind, or a feature request, or any such thing. I'm just trying to understand rrbt :)

kovas boguta

unread,
Aug 2, 2016, 11:20:48 AM8/2/16
to cloju...@googlegroups.com
IIRC there was not a overall perf improvement for the typical Clojure program. 

On Sat, Jul 30, 2016 at 10:45 AM, Robin Heggelund Hansen <skinn...@gmail.com> wrote:
I also want to stress that this isn't criticism of any kind, or a feature request, or any such thing. I'm just trying to understand rrbt :)

--

kovas boguta

unread,
Aug 2, 2016, 11:23:02 AM8/2/16
to cloju...@googlegroups.com
In general theres been a number of efforts (some still ongoing) to investigate replacing or augmenting the current datastructures. 

In the past theres always been some problem. Something would have to be a slam-dunk win to justify the effort and risk. 

Reply all
Reply to author
Forward
0 new messages