-
-
Save anonymous/965bf877a45627545932 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl -Ilib -MTime::HiRes=time -Mojo -E 'sub Mojolicious::Controller::bar { "works!" }; my $c = app->build_controller; my $before = time; $c->bar for 1 .. 100000; say time - $before' | |
0.0173139572143555 | |
$ perl -Ilib -MTime::HiRes=time -Mojo -E 'helper bar => sub { "works!" }; my $c = app->build_controller; my $before = time; $c->bar for 1 .. 100000; say time - $before' | |
0.838340044021606 | |
$ perl -Ilib -MTime::HiRes=time -Mojo -E 'helper bar => sub { "works!" }; helper foo => sub { shift }; my $c = app->build_controller; my $before = time; $c->foo->bar for 1 .. 100000; say time - $before' | |
1.64256691932678 | |
$ perl -Ilib -MTime::HiRes=time -Mojo -E 'helper "foo.bar" => sub { "works!" }; my $c = app->build_controller; my $before = time; $c->foo->bar for 1 .. 100000; say time - $before' | |
2.4735221862793 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment