File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -12552,9 +12552,20 @@ reduces them without incurring seq initialization"
1255212552 ISeqable
1255312553 (-seq [coll]
1255412554 (when (pos? count)
12555- (let [hashes (.sort (js-keys hashobj))]
12556- (mapcat #(map (fn [[k v]] (MapEntry. k v nil )) (partition 2 (unchecked-get hashobj %)))
12557- hashes))))
12555+ (let [hashes (.sort (js-keys hashobj))
12556+ cnt (alength hashes)
12557+ arr (array )]
12558+ (loop [i 0 ]
12559+ (if (< i cnt)
12560+ (let [bckt (unchecked-get hashobj (aget hashes i))
12561+ len (alength bkt)]
12562+ (loop [j 0 ]
12563+ (when (< j len)
12564+ (do
12565+ (.push arr (MapEntry. (aget bkt j) (aget bkt (inc j)) nil ))
12566+ (recur (+ j 2 )))))
12567+ (recur (inc i)))
12568+ (prim-seq arr))))))
1255812569
1255912570 ICounted
1256012571 (-count [coll] count)
You can’t perform that action at this time.
0 commit comments