Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: A "Perl-7" that I could actually USE right nowby tobyink (Canon) |
on Jun 23, 2013 at 14:40 UTC ( [id://1040325]=note: print w/replies, xml ) | Need Help?? |
For what it's worth, Mouse is much more than 25% faster than Moose (at least it is on machines where it's been compiled with XS; Mouse::PurePerl is very slightly slower than Moose). While it appears to offer good compatibility with Moose; this is on the surface only. Things start to break if you try to consume a Mouse role in Moose, or extend a Moose class with Mouse. Moo has far less of a start-up penalty than Moose, but when it comes to running speed, isn't quite as fast. On the surface it appears less Moose-compatible (but see MooX::late) but it's designed to be able to interact nicely with Moose. You can extend Moo classes with Moose, consume Moose roles in Moo, etc. The only places I can see big scope for Moose optimization are:
I've published a couple of modules on CPAN that might be of use if you're trying to eke a little more speed out of a lumbering Moose...
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
In Section
Meditations
|
|