Collection types
Creating a new type and choosing the correct type for it, either a value or a reference, is an important task, which we covered previously in Chapter 2, Making a Good Application Architecture in Swift. There is a bigger impact on performance when we work with many instances of the same type when we put them into a collection. Choosing the correct collection for a particular task is very important.
Swift has some powerful building collections; we should take a look at them first.