MooseX-Method-Signatures reviews

cpanratings
 

RSS | Module Info | Add a review of MooseX-Method-Signatures

MooseX-Method-Signatures (0.44) ***

(Full disclosure, I am the author of a competing module called Method::Signatures.)

Feature wise, this is an incredible module that I hope to recommend without reservation in the future.

It has one glaring problem: it is extraordinarily slow. How slow? At least 500x slower than a normal method call, and that's before argument checks.

My Macbook can crank through 3-4 million simple method calls a second. It can only manage 6000 with MXMS (MooseX::Method::Signatures). This is "method no_args {}", an empty subroutine with no type checks.

The empty method benchmark presents a maximum performance limit for your code if you use MXMS: 6000 methods per second [YMMV] and never more.

Large, expensive methods can use MXMS without affecting performance. Small ones get hit hard and the user is tempted to remove argument checks for micro-performance. The programmer is placed in the position to choose between performance and good practice.

MooseX-Method-Signatures (0.43) *****

I suggest potential users run their own benchmarks. In the handful of tests I ran, I saw *no* reduction in speed in our code. Granted the code is likely IO bound, but take it as one data point.

My biggest complaints have been (1) getting MMS to play nicely with PerlTidy and (2) the need to put "with <role>" after certain methods. There is now a kludge to get PerlTidy to work (see the PerlTidy change log or the PerlTidy subclass referenced here www.openswartz.com/2010/12/19/perltid....

MooseX-Method-Signatures (0.29) ***

This is a neat module, but after converting some code that made heavy use of method calls to it the runtime went from 12s to 50s. See my blog posting on the matter for further info: blogs.perl.org/users/aevar_arnfjor_bj...

I like the nice Perl 6-like syntax modules like this one provides, but the performance hit is too great for me to use it for anything serious in the future.