in reply to Moose immutable speedup?
make_immutable should make accessors faster through 'inlining'.Not as I understand it. I believe accessors are always inlined. Rather, make_immutable speeds up object creation. Using your test framework with the following tests
my %tests = ( Moose => sub { $x= MyClass ->new }, MooseImmu => sub { $x= MyImmuClass->new }, );
Yields:
Rate Moose MooseImmu Moose 15360/s -- -94% MooseImmu 261482/s 1602% --
Update:
I've been grepping pods...
The "make_immutable" call allows Moose to speed up a lot of things, most notably object construction.
$metaclass->make_immutable(%options)
...
Also, since Moose always inlines attributes...
|
|---|