Permalink
Browse files

db-get with transient map

  • Loading branch information...
1 parent 2bddbd3 commit 32148626b9485fc917771fea74d4a0b03e903c7f @alexy committed Mar 19, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/clojure/cupboard/bdb/je_marshal.clj
@@ -191,10 +191,10 @@
(def-unmarshal-read :map
(fn [tuple-input]
(let [len (unmarshal-read tuple-input)]
- (loop [i 0 res (hash-map)]
+ (loop [i 0 res (transient (hash-map))]
(if (>= i len)
- res
- (recur (inc i) (assoc res
+ (persistent! res)
+ (recur (inc i) (assoc! res
(unmarshal-read tuple-input)
(unmarshal-read tuple-input))))))))

0 comments on commit 3214862

Please sign in to comment.