O'Reilly logo

iOS and macOS™ Performance Tuning: Cocoa®, Cocoa Touch®, Objective-C®, and Swift™ by Marcel Weiher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13. I/O: Examples

Having looked at the performance characteristics of some of the I/O and serialization APIs in the previous chapter, we’ll now look at some practical examples of making I/O faster. Significantly faster.

We start out with a simple word list for a game and work our way up through Apple’s binary property list format, which we speed up significantly for many practical purposes. Finally, we throw in some fast comma-separated value (CSV) parsing and design a compact file format for public transport data that beats CoreData by orders of magnitude.

iPhone Game Dictionary

This particular quest was kicked off by a message from Miles on Apple’s cocoa-dev mailing list.1 Miles wanted to load about 2 MB of text as a dictionary of words for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required