if ($hash{$x} == 1) { # always slower than if($hash{$x}) # or if(defined($hash{$x})) } if ($hash{$x}) { # slower than if(defined($hash{$x})) # when $hash{$x} is undefined # faster than if(defined($hash{$x})) # when $hash{$x} is defined }