Is searching a huge associative array with binary search faster than accessing via array key ?
I'm on the move at the moment and want to settle an argument. Say I have a dictionary loaded into an assoc array. Elements are sorted, and there are a million Items. The dictionary is in the form term = > definition. Would it be quicker to search for a definition by using array($term) to access the key, or doing a binary search on the array? Would it be quicker over single pass or multiple term searches?