++ed by:
ABRAXXA ADAMJS ANTIPASTA AWNCORP BOWTIE

32 PAUSE user(s)
18 non-PAUSE user(s).

Toby Inkster

PURPOSE

Compares the speed of the constructor in four equivalent classes built using different tools:

Moo_MXTML

Moo with MooX::Types::MooseLike::Base types.

Moo_TT

Moo with Type::Tiny types.

Moose

Moose with Moose type constraints. Class is made immutable.

Moose_TT

Moose with Type::Tiny type constraints. Class is made immutable.

In both Moo examples, the following patch was applied, which will hopefully make it into mainstream Moo releases soon.

http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/Moo.git;a=commitdiff;h=2f425b5770149d4ed2e59da001c3be052cbd6bc1.

RESULTS

For both Moose and Moo, Type::Tiny type constraints are clearly faster than the conventional approach:

               Rate Moo_MXTML    Moo_TT     Moose  Moose_TT
   Moo_MXTML 3140/s        --      -47%      -51%      -62%
   Moo_TT    5947/s       89%        --       -8%      -28%
   Moose     6458/s      106%        9%        --      -21%
   Moose_TT  8220/s      162%       38%       27%        --

DEPENDENCIES

Moo, MooX::Types::MooseLike::Base, Moose.

AUTHOR

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE

This software is copyright (c) 2013 by Toby Inkster.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.




Hosting generously
sponsored by Bytemark