Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Persistent Data Structures for Objective-C. Parent comment
Then,
// yourDictionary is NSMutableDictionary, [yourDictionary count] > 20 NSMutableDictionary *mutable = [yourDictionary mutableCopy]; mutable[@"old_key"] = @"new_value"; NSDictionary *changedDict = [NSDictionary dictionaryWithDictionary:mutable];
// yourDictionary is AAPersistentHashMap, [yourDictionary count] > 20 AAPersistentHashMap *changedDict = [yourDictionary setObject:@"new_value" forKey:@"old_key"];
There are no comments on this comment yet.
Then,
will be slower than Remember, you need to get another immutable map, which is a modified version of the original, preferably memory-efficient, which means we want to reuse the unchanged keys/values of the original map.