In Objective-C I need to associate a mutable collection integers (monotonic, non-contiguous, could get fairly large) to boolean values. The obvious way is just to have an NSDictionary w/ NSNumbers as keys and values.
Is there a better way that doesn't involve so much object creation? I'm really not trying to pre-optimize so much as learn if there are techniques I'm not familiar with.
This data is private to a particular class implementation, so integrating with the rest of the Cocoa APIs isn't a requirement.