FROM : j o a r
DATE : Tue Nov 30 09:23:36 2004
On 2004-11-30, at 02.28, Miguel Arroz wrote:
> I'm using a NSDictionary to store a lot of stuff (about 5000
> objects). I need to access the dictionary a lot, and REALLY fast. I'm
> getting some slowness that I think it's related to the NSDictionary.
> Shark says that my keys are being compares a lot (30% of the time).
> This is strange, as in a hash table, we should have very little
> comparions, unless the hash table array is too small. How can I know
> (and change!) the array size of the hash table that is hidden in a
> NSDictionary?
What type of keys are you using? If they are custom objects, describe
how their hash+isEqual are implemented. If they are standard Foundation
classes, describe their characteristics.
j o a r
DATE : Tue Nov 30 09:23:36 2004
On 2004-11-30, at 02.28, Miguel Arroz wrote:
> I'm using a NSDictionary to store a lot of stuff (about 5000
> objects). I need to access the dictionary a lot, and REALLY fast. I'm
> getting some slowness that I think it's related to the NSDictionary.
> Shark says that my keys are being compares a lot (30% of the time).
> This is strange, as in a hash table, we should have very little
> comparions, unless the hash table array is too small. How can I know
> (and change!) the array size of the hash table that is hidden in a
> NSDictionary?
What type of keys are you using? If they are custom objects, describe
how their hash+isEqual are implemented. If they are standard Foundation
classes, describe their characteristics.
j o a r
| Related mails | Author | Date |
|---|---|---|
| Miguel Arroz | Nov 30, 02:28 | |
| Shawn Erickson | Nov 30, 02:46 | |
| j o a r | Nov 30, 09:23 | |
| Miguel Arroz | Dec 1, 00:23 |






Cocoa mail archive

