PERF: improve perf of array_equivalent_object (GH8512)
Merge pull request #8570 from jreback/equals

PERF: improve perf of array_equivalent_object (GH8512)