AsyncBanana / microdiff

A fast, zero dependency object and array comparison library. Significantly faster than most other deep comparison libraries and has full TypeScript support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible optimization: hashing

LifeIsStrange opened this issue · comments

Leverage hashing for detecting change much much faster than a deep comparison?
And microdiff would have optionally a backing buffer/cache of previous object hashes?

What do you propose to hash? If I understand you, you want to hash objects and compare hashes, and only if hashes are different, do comparison?

I think the user should do this themselves because this would increase code size, and for many things, a lack of changes is unlikely enough that the disadvantages outweigh the advantages.