Guest User

Untitled

a guest
Jan 21st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. {
  2. package WithMXMS_immutable;
  3.  
  4. use Moose;
  5. use MooseX::Method::Signatures;
  6.  
  7. method gndn {}
  8.  
  9. __PACKAGE__->meta->make_immutable;
  10. }
  11.  
  12. use v5.14;
  13. use Time::HiRes qw(time);
  14.  
  15. my $Runs = 15_000;
  16.  
  17. {
  18. my $obj = WithMXMS_immutable->new;
  19. my $start = time;
  20. $obj->gndn for 1..$Runs;
  21. my $end = time;
  22. say +($end - $start)." seconds for MooseX::Method::Signatures method call (immutable)";
  23. }
Add Comment
Please, Sign In to add comment