When Swift synthesizes Equatable conformance for an Array property, does it perform some sort of "fast-check" to see if the underlying storage of the array is the same or does it always perform an equality test on each element in the arrays?
let founders = ["Alice", "Dave", "Jane", "John"]
struct Organization: Equatable {
let name:String
let members:[String]
}
let org1 = Organization(name:"Org 1", members:founders)
let org2 = Organization(name:"Org 2", members:founders)
// Does this equality test check every element in `members`?
if org1 == org2 {
// ...
}
Bonus question: Where in the Swift codebase would I look to see how something like synthesized Equatable conformance is implemented for array properties?