3 ms·
Om is fast at checking if a component's state has changed because you can do a very fast identity comparison on the persistent hash map holding state, but persi
by adrianm 12y ago
Om is fast at checking if a component's state has changed because you can do a very fast identity comparison on the persistent hash map holding state, but persistent data structures are not faster than their mutable cousins simply because of immutability. That immutability leads to significantly more objects being allocated, which means to really take advantage of these features in a managed language you need a VM with a very high performance garbage collector. This is partly why Clojure on the JVM works so well. That being said, non JIT compiled JavaScript VMs generally provide terrible performance for ClojureScript. I do not believe JavaScriptCore JITs anything, so I don't know how immediately useful ClojureScript with React Native will be outside of toy examples.
- danabramov 12y agoFair points.
- amccloud 12y ago> That immutability leads to significantly more objects being allocated What about shared immutable data structures?
- tree_of_item 12y agoClojure uses structural sharing of course, but that was taken in to account in the parent comment. It's still a lot of allocation.