php array_intersect() efficiency
<p>consider the below script. two arrays with only three values.when i compare these two arrays using array_intersect(). the result is fast.</p>

<pre><code>    &lt;?php
$arrayOne = array('3', '4', '5');
$arrayTwo = array('4', '5', '6');

$intersect = array_intersect($arrayOne, $arrayTwo);

print_r($intersect );

?&gt;
</code></pre>

<p>my question is what is the efficiency of the array_intersect(). whether if we compare two arrays both having 1000 values each. would produce better result..... r we need to use some hash function to deal with finding common values quickly which will be effective???.. i need ur suggestion for this...</p>

<p>i am doing an application.if an person comes and  login using facebook login.then the application will get his friends list and find whether any friends as commented in my app before and show it to him. roughly a friends may have 200 to300 friends in facebook and db has more than 1000 records. i need to find that efficiently how can i do that.......</p>
