Reply to Re: how are php arrays indexed?

Your name:

Reply:


Posted by gosha bine on 05/16/07 11:35

On 16.05.2007 13:01 Taras_96 wrote:
> Hi everyone,
>
> I'm wondering if anyone knows whether PHP does some indexing behind
> the scenes to make array searches faster.
>
> What I have is an array of around 100 000 elements, and I have a list
> of 1000 given element which I need to see whether they contained in
> the array. This means 1000 searches on an array of size 100 000. I'm
> hoping that PHP indexes it's keys using a binary tree or
> something.. :)
>
> Thanks
>
> Taras
>

php uses hash function to speed up access to array elements, namely
Bernstein's function, also known as "times 33"

--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация