On Tue, Sep 16, 2008 at 7:36 PM, Stephen Bain stephen.bain@gmail.com wrote:
!count( $array ) is also something like 40 times faster than !( $array ), apparently.
My quick tests show that !$array is significantly faster, as you'd expect, based on variants of this loop:
for( $i = 0; $i < 100000; $i++ ) { !count( $array ); }
However, if checking whether an array is empty is a bottleneck in your program, you deserve a small prize for the weirdness of your optimization problems.