Hash vs list

Levi Pearson levi at cold.org
Fri Apr 21 22:44:18 MDT 2006


On Apr 21, 2006, at 9:19 PM, Jonathan Ellis wrote:
>
> However, PHP is brain-damaged and implements lists as hashes whose  
> keys
> are the counting numbers.  (In PHP terminology, both lists and hashes
> are "arrays.")  So in PHP, looking something up in a hash _is_ always
> faster than searching a list, since the search is a series of hash
> lookups.

Wow, that is kind of brain-damaged.  The moral of the story is that  
when using a high-level language, you need to know the implementation  
details before you can perform a meaningful performance analysis.

		--Levi



More information about the PLUG mailing list