From 2c5dbdf0f728fd78ff6f44e7608a56e1f4365113 Mon Sep 17 00:00:00 2001 From: David Nolen Date: Tue, 20 Feb 2024 14:45:38 -0500 Subject: [PATCH] CLJ-XXXX remove unnecessary key-check for HashCollisionNode (#222) Co-authored-by: Hyunwoo Nam port of fix to Clojure https://github.com/clojure/clojure/commit/8b4261bc1e377c8a702f2b5538ab728700737b0f --- src/main/cljs/cljs/core.cljs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/cljs/cljs/core.cljs b/src/main/cljs/cljs/core.cljs index 0afb3d475..ac7dbfc45 100644 --- a/src/main/cljs/cljs/core.cljs +++ b/src/main/cljs/cljs/core.cljs @@ -7828,15 +7828,13 @@ reduces them without incurring seq initialization" (inode-lookup [inode shift hash key not-found] (let [idx (hash-collision-node-find-index arr cnt key)] - (cond (< idx 0) not-found - (key-test key (aget arr idx)) (aget arr (inc idx)) - :else not-found))) + (cond (< idx 0) not-found + :else (aget arr (inc idx))))) (inode-find [inode shift hash key not-found] (let [idx (hash-collision-node-find-index arr cnt key)] - (cond (< idx 0) not-found - (key-test key (aget arr idx)) (MapEntry. (aget arr idx) (aget arr (inc idx)) nil) - :else not-found))) + (cond (< idx 0) not-found + :else (MapEntry. (aget arr idx) (aget arr (inc idx)) nil)))) (inode-seq [inode] (create-inode-seq arr))