Which is better approach between use of NSDictionary and NSObject with NSStrings as properties, in terms of faster performance and efficient memory management, if the code is written for an iPhone application?
E.g. If an application deals with parsing an XML file which is as follows: < ?xml version="1.0" encoding="utf-8" ?>
< FirstName>AAA< / FirstName>
< MiddleName>BBB< / MiddleName>
< LastName>ZZZ< / LastName>
< Age>28< /Age>
< Gender>Male< /Gender>
< /Sync>
then, while storing up the parsed values, which approach is more efficient and proper, if the XML file size can be little bigger? Is storing the parsed values in a 'NSDictionary' against the respective 'keys'(e.g. Key=FirstName Value=AAA) efficient and proper as compared to storing the same parsed data into the NSString variables(i.e. having NSString properties of all the interested nodes to store the respective values. e.g. NSString *firstName will store "AAA") of a 'NSObject' subclass? I'm looking for more faster performance as well as the memory efficiency.