Both the 'List' and 'Map' data structures in Bifurcan use innovative approaches that were published after Clojure's original release [1] [2]. In the case of the immutable map, you get faster iteration and the structural invariants allow for some clever stuff w.r.t. equality checks and set operations. In the case of the immutable list/vector, you get fast concatenation, the ability to add and remove from both ends of the collection, and a `subvec` that doesn't hold onto the entire underlying data structure.
All of this is MIT licensed, so please feel welcome to open a PR against Clojure to change the core data structures using my code, but I'd rate the chance of that being accepted as somewhere between "low" and "nonexistent". Also, it should be noted that Clojure's implementation is much more battle-tested than my own at this point. But if anyone wants to tilt at that particular windmill, feel free to ask me any questions you may have about the implementation. Zach [1] https://michael.steindorfer.name/publications/oopsla15.pdf [2] https://infoscience.epfl.ch/record/169879/files/RMTrees.pdf On Mon, Mar 27, 2017 at 12:30 PM Luke Burton <luke_bur...@me.com> wrote: > > I'm not well versed enough in these data structures to know this without > asking (apologies if it's really obvious to some people): is there > opportunity to improve Clojure's built-in data structures with Bifurcan > rather than trying to wrap Bifurcan's structures in Clojure? > > As an aside, I want to draw people's attention to the sweet little > criterium + gnuplot setup you have there for generating benchmarking plots. > Nice! > > > On Mar 27, 2017, at 10:13 AM, Zach Tellman <ztell...@gmail.com> wrote: > > Benchmarks are available here, and the Clojure benchmarks make use of > transients wherever possible: > https://github.com/lacuna/bifurcan/blob/master/doc/benchmarks.md. > > More generally, while transients are often used in practice to quickly > construct a read-only data structure, the more formal definition is that > they provide an O(1) mechanism for transforming between immutable and > mutable forms. This isn't possible with purely mutable data structures > like Java's HashMap or Bifurcan's LinearMap. So while wrapping these data > structures in the Clojure API would provide better performance for > construction and lookups, it wouldn't be quite the same thing as a > transient. > > > -- > 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 > --- > You received this message because you are subscribed to a topic in the > Google Groups "Clojure" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojure/1m_I7IrDGb0/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.