On Nov 5, 2013, at 2:47 PM, Chris Paveglio <[email protected]> wrote:

> Could you expand on that a bit or maybe send me a link for more info? My ID 
> numbers aren't sequential from 0 to 100. They are somewhat random (457, 853, 
> 1587, etc). An example would be {item1ID: 234, itemID2: 3987, exclusive:yes}. 
> From  your explanation, would a bitmap index work? Adding my item# together 
> and multiply n wouldn't give a real offset to a bit in a bitmap.

If the item numbers are too large to practically use a bitmap, you can use a 
hashtable instead. In Cocoa terms, create an NSMutableSet whose keys are pairs 
of itemIDs. The simplest key type would be an NSArray of two NSNumbers, but 
it’s cheaper to combine the two numbers into one object, for instance by 
packing them into the upper and lower halves of a 64-bit integer.

—Jens
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to