Remove redundant map lookups in map-diff

The :else branch of diff-attr was calling (get m1 key) and
(get m2 key) again, but v1 and v2 were already bound to those
exact values. Reuse the existing bindings to avoid the extra
lookups.
This commit is contained in:
Andrey Antukh 2026-04-14 20:13:20 +00:00 committed by Belén Albeza
parent 29ea1cc495
commit eca9b63d68

View File

@ -952,7 +952,7 @@
(assoc diff key (map-diff v1 v2))
:else
(assoc diff key [(get m1 key) (get m2 key)]))))]
(assoc diff key [v1 v2]))))]
(->> keys
(reduce diff-attr {}))))