Created
September 25, 2010 11:14
-
-
Save Mons/596741 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
se uni::perl; | |
use Benchmark ':all'; | |
use lib::abs; | |
BEGIN {unshift @INC, lib::abs::path 'kraih/lib' } | |
use Mojo::ByteStream 'b';; | |
say $INC{'Mojo/ByteStream.pm'}; | |
my %results; | |
$results{old} = timethis -1 , sub { b('x'x1000) }; | |
delete $INC{'Mojo/ByteStream.pm'}; | |
delete $Mojo::{'ByteStream::'}; | |
shift @INC; | |
unshift @INC, lib::abs::path 'mons/lib'; | |
require Mojo::ByteStream; | |
Mojo::ByteStream->import('b'); | |
say $INC{'Mojo/ByteStream.pm'}; | |
$results{new} = timethis -1 , sub { b('x'x1000) }; | |
cmpthese \%results; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment