use Benchmark qw(cmpthese); our $a1='a'x1e6; our $b1=12345; cmpthese -1,{ und=>q[ sub{ my( undef, $x) = @_ }->( $a1, $b1 ) ], skp=>q[ sub{ my $x = $_[1] }->( $a1, $b1 ) ], var=>q[ sub{ my( $unused, $x ) = @_;}->( $a1, $b1 ) ], }; #output Rate var und skp var 66.3/s -- -10% -100% und 73.5/s 11% -- -100% skp 945230/s 1424595% 1286780% --