Array design question

Peter Slizik peter.slizik at pobox.sk
Thu May 29 07:43:38 EDT 2003


Paul Rubin wrote:
> Peter Slizik <peter.slizik at pobox.sk> writes:
> 
>>Thanks, I know I can use a dictionary. But I think the usage of a
>>hash-table in the place where 'ordinary' array could be employed is at
>>least unaesthetical. It is also inefficient.
> 
> 
> What do you think PHP does?

I don't know. Do you think it uses hashes?

I know only that when using integer indices, the function which computes 
addresses is quite simple.

address = beginning_address + (index * len(item))

Usage of "string indices" reuqires complicated hash mechanism.

If you are trying to suggest that PHP uses hashes also in the case of 
integer indexing, I feel ... how to put it ... cheated?

Peter





More information about the Python-list mailing list