Skip to content

Instantly share code, notes, and snippets.

@clairvy
Created July 8, 2012 06:35
Show Gist options
  • Save clairvy/3069674 to your computer and use it in GitHub Desktop.
Save clairvy/3069674 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use Benchmark;
my $a;
my $b;
my $c;
Benchmark::timethese(10000000, {
'zenchi' => sub {
++$a;
},
'kouchi' => sub {
$c++;
},
'equal_plus' => sub {
$b = $b + 1;
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment