Skip to content

Instantly share code, notes, and snippets.

@newfoundresearch
Created December 28, 2011 01:21
(defn t2 [ks]
(persistent!
(reduce
(fn [m k]
(assoc! m k (* k 2)))
(transient {})
ks)))
(def m (t2 (range 1 1e6)))
OutOfMemoryError Java heap space clojure.lang.PersistentHashMap$BitmapIndexedNode.assoc (PersistentHashMap.java:678)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment