Exploring Swift Array’s Implementation

Ankit Aggarwal: Swift declares a C struct in its SwiftShim’s module inside GlobalObject.h called _SwiftArrayBodyStorage[…]count is the number of elements currently stored in the buffer_capacityAndFlags is used to store two things:first is the capacity of the buffersecond “Is the Element type bitwise-compatible with some Objective-C class?” Via David Smith: Apparently C-like performance, memory safety, resizing, … Continue reading Exploring Swift Array’s Implementation