Greetings,
I'm working with some folks that are wanting to put a large number of
objects into a dictionary, keyed by number. When using string keys
created
with
string1 = [NSString stringWithFormat:@"%d", clauseNumber];
[clauseHashTable setObject:currentClause forKey:string1];
with clauseNumber going from 1 to a bit over 1 million, It takes about 6
seconds (2-way G5 running OS X) to populate a dictionary.
When using NSNumbers,
number = [NSNumber numberWithInt: clauseNumber];
[clauseHashTable setObject: currentClause
forKey: number];
It takes about 21 minutes. Using the same code with Apple's Cocoa
libraries
takes about 3 seconds.