This could avoid a ton of traversing potentially. Not sure if it's actually a good idea, so opening here for comments but if it is, I'd happily take a stab at it.
Basic idea is if you to save large objects being compared all the time (think fast re-renders with objects), this would use WeakMap.set(objA, aID), and WeakMap.set(objB, bID) and then separately store (aID => bID => true/false). Sound right?
@natew very good idea! i would however like this project to closely mirror fast-deep-equal; they can make it really fast, and we can make it work with React. Have you pitched them the idea?
This could avoid a ton of traversing potentially. Not sure if it's actually a good idea, so opening here for comments but if it is, I'd happily take a stab at it.
Basic idea is if you to save large objects being compared all the time (think fast re-renders with objects), this would use
WeakMap.set(objA, aID)
, andWeakMap.set(objB, bID)
and then separately store (aID => bID => true/false). Sound right?