$ perl -MBenchmark=:all -e " cmpthese -3, { a=>sub{return int @_}, b=>sub{int@_},c=>sub{scalar@_},d=>sub{0+@_}} " Rate a d b c a 5279994/s -- -35% -52% -67% d 8131795/s 54% -- -26% -50% b 10997789/s 108% 35% -- -32% c 16189364/s 207% 99% 47% --