Skip to content

Comment on The fastest object diff library in JavaScript

Comments

Interesting it’s so much faster, the code looks very natural and trickless besides the richobject check (at least at first glance).

Wonder what everyone else is doing to make it slow.

Also curious what mobx and reacts object diffing looks like now.

For a bit of info on why it is often faster, you can look at https://github.com/AsyncBanana/microdiff/issues/2. I will probably add something to the README about that soon too.

Not checking for arrays (and nested array recursion) is most likely the biggest performance/feature difference.

Some diff libraries have React specific optimizations, if values might be React elements/components.

It doesn't handle arrays, for one example.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.