Re: Switched map for record and got slower

2015-01-29 Thread Pedro Pereira Santos
Hey guys, The major problem was the (.name unit). Changed to (:name unit) and got the speed back. Still not very much faster than maps, but at least not so slow. Thank you for the info :) On Wednesday, January 28, 2015 at 9:00:37 PM UTC, Mike Rodriguez wrote: > > Sorry. That was a typo. I meant

Re: Switched map for record and got slower

2015-01-28 Thread Mike Rodriguez
Sorry. That was a typo. I meant 1.8. I'm just referring to the version tagged on the Jira. -- 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 -

Re: Switched map for record and got slower

2015-01-28 Thread Fluid Dynamics
On Wednesday, January 28, 2015 at 3:30:08 PM UTC-5, Mike Rodriguez wrote: > > Another thing to note is if you were using these maps as keys to a > hash-based associative structure, like a hash map, then you be aware that > Clojure record do not cache their hash code like other Clojure persistent

Switched map for record and got slower

2015-01-28 Thread Mike Rodriguez
Another thing to note is if you were using these maps as keys to a hash-based associative structure, like a hash map, then you be aware that Clojure record do not cache their hash code like other Clojure persistent map impls do. I've had this eat up performance time in some scenarios before. Th

Re: Switched map for record and got slower

2015-01-28 Thread Alex Miller
On Wednesday, January 28, 2015 at 2:07:07 PM UTC-6, Fluid Dynamics wrote: > > On Wednesday, January 28, 2015 at 1:59:49 PM UTC-5, Marshall > Bockrath-Vandegrift wrote: >> >> At the very least, all the places where you switched to method/property >> syntax now require runtime reflection. Try lea

Re: Switched map for record and got slower

2015-01-28 Thread Fluid Dynamics
On Wednesday, January 28, 2015 at 1:59:49 PM UTC-5, Marshall Bockrath-Vandegrift wrote: > > At the very least, all the places where you switched to method/property > syntax now require runtime reflection. Try leaving those as they were, or > switching to using the keyword as the function (which

Re: Switched map for record and got slower

2015-01-28 Thread Marshall Bockrath-Vandegrift
At the very least, all the places where you switched to method/property syntax now require runtime reflection. Try leaving those as they were, or switching to using the keyword as the function (which is somewhat more idiomatic). You could instead hint the appropriate object type in each functi

Switched map for record and got slower

2015-01-28 Thread Pedro Pereira Santos
Hello, I have a vector with ~20 elements that don't change. They are basically metadata information that are used on the application. Those 20 elements are maps, and I gathered them like: (defn units [] [unit1 unit2 ...]) I created a record and changed the gathering to: (defn units [] (ma