PURPOSE

Speed comparison between MooseX::Declare, Moops, Zydeco, and Dios.

 # ============================================================
 # Moose implementations
 # ============================================================
 #               Rate         MXD    Zy_Moose Moops_Moose
 # MXD         94.2/s          --        -98%        -98%
 # Zy_Moose    4525/s       4702%          --        -18%
 # Moops_Moose 5531/s       5769%         22%          --
 # 
 # ============================================================
 # Moo implementations
 # ============================================================
 #             Rate Moops_Moo    Zy_Moo
 # Moops_Moo 3169/s        --      -24%
 # Zy_Moo    4148/s       31%        --
 # 
 # ============================================================
 # Mouse implementations
 # ============================================================
 #               Rate    Zy_Mouse Moops_Mouse
 # Zy_Mouse    5966/s          --        -31%
 # Moops_Mouse 8698/s         46%          --
 # 
 # ============================================================
 # All implementations
 # ============================================================
 #               Rate    Dios   MXD Moops_Moo  Zy_Moo  Zy_Moose Moops_Moose  Zy_Mouse Moops_Mouse
 # Dios        2.19/s      --  -98%     -100%   -100%     -100%       -100%     -100%       -100%
 # MXD         94.5/s   4209%    --      -97%    -98%      -98%        -98%      -98%        -99%
 # Moops_Moo   3139/s 142960% 3220%        --    -26%      -31%        -45%      -47%        -64%
 # Zy_Moo      4225/s 192461% 4369%       35%      --       -7%        -26%      -29%        -52%
 # Zy_Moose    4567/s 208038% 4731%       45%      8%        --        -20%      -23%        -48%
 # Moops_Moose 5689/s 259136% 5917%       81%     35%       25%          --       -5%        -35%
 # Zy_Mouse    5966/s 271781% 6210%       90%     41%       31%          5%        --        -32%
 # Moops_Mouse 8727/s 397592% 9130%      178%    107%       91%         53%       46%          --

For Moose classes, Moops is the fastest, followed by Zydeco, with MooseX::Declare trailing a long was behind.

For Moo classes, Zydeco beats Moops.

For Mouse classes, Moops beats Zydeco.

Overall, Mouse beats Moose beats Moo.

All of the above are faster than Dios.

Compile time isn't measured in this benchmark, but it's likely that Moo-based classes will compile faster. Moops compiles a lot faster than MooseX::Declare and Dios. Zydeco does not compile as fast as Moops, but it's not much slower.

AUTHOR

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE

This software is copyright (c) 2013, 2020 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.