4 ms·
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 i
by parhamn 5y 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.
- AsyncBanana 5y agoFor a bit of info on why it is often faster, you can look at https://github.com/AsyncBanana/microdiff/issues/2 https://github.com/AsyncBanana/microdiff/issues/2. I will probably add something to the README about that soon too.
- megous 5y agoIt doesn't handle arrays, for one example.
- sbr464 5y agoNot 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.