Do you think that maps vs vectors would make a difference in the transient case?
On Wednesday, 20 April 2016 13:42:12 UTC-7, Andy Fingerhut wrote: > > Transients are a performance optimization that can give quite significant > performance increases when you know you will be doing many updates to a > Clojure vector or map. A long sequence of updates on a transient tends to > allocate much less memory than the corresponding sequence of updates on a > non-transient data structure. > > Andy > > On Wed, Apr 20, 2016 at 11:03 AM, JvJ <kfjwh...@gmail.com <javascript:>> > wrote: > >> I'm writing some code that I would like to perform as quickly as >> possible. Currently, I am iterating over large hash maps and performing >> assocs and dissocs. >> >> I don't know much about performance optimization, but I am told that >> memory locality is a big factor. I would like to know how Persistent Maps, >> Persistent Vectors, Transient Maps, and Transient Vectors compare to one >> another in this respect. >> >> Also, the objects in the collection that I'm iterating over will >> themselves be maps. So, if I had a vector with good memory locality, but >> it stored what are effectively pointers to maps allocated elsewhere, will >> that nullify the benefits of memory locality? >> >> Thanks >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clo...@googlegroups.com >> <javascript:> >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+u...@googlegroups.com <javascript:> >> 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+u...@googlegroups.com <javascript:>. >> 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.