Skip Menu |
 

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

Report information
The Basics
Id: 85333
Status: open
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.
Download (untitled) / with headers
text/plain 354b
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.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.