Skip Menu |

This queue is for tickets about the Number-Fraction CPAN distribution.

Report information
The Basics
Id: 85333
Status: resolved
Priority: 0/
Queue: Number-Fraction

People
Owner: DAVECROSS [...] cpan.org
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 2.00
Fixed in: (no value)



Subject: Reduce the Moose tax, perhaps use Moo
Not using the MOP, but with automatic upgrade to Moose when it's loaded, Moo would be a more lightweight, faster to load option, with very small modifcations to the isa arguments to has.
On Wed May 15 17:13:37 2013, JWRIGHT wrote: Show quoted text
> Not using the MOP, but with automatic upgrade to Moose when it's loaded, Moo > would be a more lightweight, faster to load option, with very small > modifcations to the isa arguments to has.
Is the "Moose tax" really that much of a problem? I'll do some tests over the weekend and decide what I want to do.
On Thu May 16 05:09:19 2013, DAVECROSS wrote:
Show quoted text
> Is the "Moose tax" really that much of a problem?

The problem is in scripts that need the speed, even using Number::Fraction once, increases the loading time.

Running prove -Q -l t/ with a patched Number/Fraction.pm (I also included MooX::Types::MooseLike for the Int type):

$ time prove -Q -l t/
All tests successful.
Files=14, Tests=161,  1 wallclock secs ( 0.11 usr  0.11 sys +  0.81 cusr  0.22 csys =  1.25 CPU)
Result: PASS
    0m1.27s real     0m1.00s user     0m0.34s system

and with the original:
$ time prove -Q -l t/                                  
All tests successful.
Files=14, Tests=161,  5 wallclock secs ( 0.06 usr  0.24 sys +  3.69 cusr  0.45 csys =  4.44 CPU)
Result: PASS
    0m4.48s real     0m3.83s user     0m0.70s system



Patch to Fraction.pm attached.
Subject: patch-lib-Number-Fraction_pm
Download patch-lib-Number-Fraction_pm
application/octet-stream 428b

Message body not shown because it is not plain text.

I'm reviewing all my CPAN RT queues before the service closes down next year. Sorry for taking seven years to resolve this! I suspect that you don't care any more. But version 2.1.0 is en route to CPAN now and uses Moo instead of Moose. Cheers, Dave...