4 ms·
I didn't read the whole blog series, but this data structure seems like it could support O(log(n)) insert/remove in middle or front. The equivalent operation in
by rawnlq 11y ago
I didn't read the whole blog series, but this data structure seems like it could support O(log(n)) insert/remove in middle or front. The equivalent operation in an ArrayList would take O(n).
Why not show off this performance advantage in the benchmark?
- deliminator 11y agoClojure's built in PersistentVector does not support O(log(n)) inserts/removes from the middle/front, but there is another implementation that shares a lot of it's implementation with some extensions that does: https://github.com/clojure/core.rrb-vector/ https://github.com/clojure/core.rrb-vector/