Speed of reading NSUserDefaults vs variables
问题 I have an app and it calls to variables often. And these variables are stored in NSUserDefaults . I'm wondering where NSUserDefaults is storing? And if I call NSUserDefaults directly instead of using variables. Which is faster? variables or NSUserDefaults . Because using variables to store NSUserDefaults will be the cause of using more memory. 回答1: NSUserDefaults persists its data on disk so at some point it must load that data from disk in order to store it in memory. It will need to write