This question on \'How to tell if a PHP array is empty\' had me thinking of this question
Is there a reason that count should be used instead of e
Hope this might help someone even though it has already been answered (and debated some what). In my own scenario, I know all my arrays all have 7 elements (checks were made earlier in my code) and I am performing an array_diff which of course returns an array of zero when equal.
I had 34 sec for count and 17 sec for empty. Both give me the same calculations so my code is still fine.
However you can also try the == or === as in PHP - Check if two arrays are equal. The best I would say is try count vs empty vs == empty array, then see which gives your own best perfs. In my case count was the slowest so I am using empty now... will be checking serialize next