Hacker News new | ask | show | jobs
by parhamn 1691 days ago
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.

3 comments

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.