Skip to content

Commit 3ea40a9

Browse files
swannodettecooljeanius
authored andcommitted
CLJ-XXXX remove unnecessary key-check for HashCollisionNode (clojure#222)
Co-authored-by: Hyunwoo Nam <[email protected]> port of fix to Clojure clojure/clojure@8b4261b
1 parent 54a7c0c commit 3ea40a9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/main/cljs/cljs/core.cljs

+4-6
Original file line numberDiff line numberDiff line change
@@ -7828,15 +7828,13 @@ reduces them without incurring seq initialization"
78287828

78297829
(inode-lookup [inode shift hash key not-found]
78307830
(let [idx (hash-collision-node-find-index arr cnt key)]
7831-
(cond (< idx 0) not-found
7832-
(key-test key (aget arr idx)) (aget arr (inc idx))
7833-
:else not-found)))
7831+
(cond (< idx 0) not-found
7832+
:else (aget arr (inc idx)))))
78347833

78357834
(inode-find [inode shift hash key not-found]
78367835
(let [idx (hash-collision-node-find-index arr cnt key)]
7837-
(cond (< idx 0) not-found
7838-
(key-test key (aget arr idx)) (MapEntry. (aget arr idx) (aget arr (inc idx)) nil)
7839-
:else not-found)))
7836+
(cond (< idx 0) not-found
7837+
:else (MapEntry. (aget arr idx) (aget arr (inc idx)) nil))))
78407838

78417839
(inode-seq [inode]
78427840
(create-inode-seq arr))

0 commit comments

Comments
 (0)