equality checking of clojure data structures

2015-06-27 Thread Jacob Goodson
I was wondering something... Would (= {:x 1} {:x 1}) be just as fast as (= 1 1) since maps are immutable? The idea is that since clojure data structures are just values can they be compared much faster than there mutable counter parts? Thanks. -- You received this message because you are

Re: Clojure for Desktop UI Design Application

2015-06-27 Thread Efrain Bergillos
I have been working on a desktop App for the last few months and I have not got many problems with the architecture and isolation of the views. In my young blog, I have few posts of how to set up and launch the JavaFX App. I also have a MVVM and the conventions of how to compose each

Re: equality checking of clojure data structures

2015-06-27 Thread Andy Fingerhut
(let [foo {:x 1}] (= foo foo)) is fast, because they are identical, and = is fast for things that are identical. In general, two maps that are = are often not identical. If two maps have different numbers of elements, = should quickly return false because of the way equiv() is implemented for

Re: equality checking of clojure data structures

2015-06-27 Thread Jacob Goodson
Thanks. What about the perf of something like this... ({{:x 1 :y 2} :point} {:x 1 :y 2}) vs ({1 2} 1) and what if the map was mutable as a key? On Saturday, June 27, 2015 at 10:08:19 AM UTC-4, Andy Fingerhut wrote: (let [foo {:x 1}] (= foo foo)) is fast, because they are identical,

Re: equality checking of clojure data structures

2015-06-27 Thread Jacob Goodson
One more thing, is it cheap to hash immutable maps vs mutable ones? On Saturday, June 27, 2015 at 10:44:44 AM UTC-4, Jacob Goodson wrote: Thanks. What about the perf of something like this... ({{:x 1 :y 2} :point} {:x 1 :y 2}) vs ({1 2} 1) and what if the map was mutable as a key?

Re: equality checking of clojure data structures

2015-06-27 Thread Andy Fingerhut
On this last question, most (maybe all) Clojure immutable collections store their hash value after it has been calculated once, so it need not be calculated again. Even the first time a collection's hash is calculated, it is a function of the hash of its elements (set elements, or map keys

ANN Monger 3.0.0-rc2 is released

2015-06-27 Thread Michael Klishin
Monger [1] is a Clojure MongoDB driver for a more civilized age. Monger 3.0 is a major release that sets up ground for various MongoDB 3.x improvements and uses MongoDB Java driver 3.0 under the hood. There are breaking changes in 3.0. You can learn more about 2.x to 3.0 changes in the RC1