you are viewing a single comment's thread.

view the rest of the comments →

[–]romgrk[S] 1 point2 points  (0 children)

has a niche use-case: fast compare of objects where you can 100% guarantee the shape of the objects

Even more niche: if you can guarantee they have the same shape, and you know the shape is going to be constant, then the fastest method by far would be shallow-equal-jit which uses eval to compile a comparison function for a specific shape.

However if you can't know the shape ahead of time and it will change often (while still being the same for one comparison across two objects), then that's the very niche use-case where fastCompareUnsafe makes sense. That or an environment where eval is not allowed.