Friday, March 24, 2017

Flipping Arrays versus Intersecting Arrays


Your results should not vary much from this benchmark, since it uses a million elements per array:
+--------------------------------------------------+
|   array_intersect took 3.6954879760742E-5 
|
|   array_flip took 0.039736986160278 
+--------------------------------------------------+

Ideone.com - 6TZLns - Online PHP Interpreter & Debugging Tool

No comments: