Skip to content

Instantly share code, notes, and snippets.

@yko

yko/indirect.pl Secret

Created January 11, 2011 14:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yko/9abff820fd7afbc373eb to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Benchmark ':all';
sub do_get {
my $self = $_[0];
}
@_ = ('foo');
timethese(
10000000,
{ 'direct' => sub { &do_get },
'pass' => sub { do_get(@_); },
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment