cs: improve equal?-based immutable hash

Check leaf hash code before a more general (and potentially much
slower) equality check.
This commit is contained in:
Matthew Flatt 2019-12-28 08:05:22 -06:00
parent 330ae24ce1
commit 2fcdd7c292

View File

@ -84,7 +84,8 @@
(loop (Br-right t)))]
[(Lf? t)
(if (key=? et key (Lf-key t))
(if (and (fx= h (Lf-hash t))
(key=? et key (Lf-key t)))
(with-leaf t)
default)]