• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dictionary or Array?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dictionary or Array?


  • Subject: Re: Dictionary or Array?
  • From: Wade Tregaskis <email@hidden>
  • Date: Sat, 14 Jun 2003 10:13:37 +1000

You must have that reversed. A dictionary lookup requires a hash operation, an array lookup is simple arithmetic.

If you know the index of the item you want. If you don't, but do have some kind of key - like a field name - then for more than 50 items (or so) a hash lookup is going to be much faster than a linear search on the array.

Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Dictionary or Array? (From: zauhar <email@hidden>)

  • Prev by Date: Re: Cocoa-Java does not allow a space in the project name?
  • Next by Date: Re: array performance
  • Previous by thread: Re: Dictionary or Array?
  • Next by thread: Re: Dictionary or Array?
  • Index(es):
    • Date
    • Thread