$foo eq ''
), the slowest is the regular expression ($foo =~ /^$/
):My own results:
Rate regexp direct length regexp 4219409/s -- -76% -78% direct 17543860/s 316% -- -7% length 18867925/s 347% 8% -- Rate regexp length direct regexp 5128205/s -- -73% -74% length 18867925/s 268% -- -6% direct 20000000/s 290% 6% --