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
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
(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
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,
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?
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
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