its isEmpty property instead of comparing count to zero. Unless the collection guarantees random-access performance, calculating count can be an O(n) operation.2 ʮίϨΫγϣϯ͕ۭ͔Ͳ͏͔ௐΔͨΊʹɺcount Λθϩͱൺ ֱ͢ΔͷͰͳ͘ɺisEmpty ϓϩύςΟΛ͍ͳ͍͞ʯ 2 https://developer.apple.com/documentation/swift/collection/2885508-count SwiftϓϩάϥϚͷͨΊͷࠓ͞Βฉ͚ͳ͍ܭࢉྔͷ / iOSDC Japan 2017 / © Hisakuni Fujimoto, 2017 22