develooper Front page | perl.moose | Postings from July 2015

Re: Benchmarking Moo(se)?

Thread Previous | Thread Next
From:
Aran Deltac
Date:
July 25, 2015 06:37
Subject:
Re: Benchmarking Moo(se)?
Message ID:
CAL5V4pFBB7459imwrZwvEOm=1mKHz0GbubGba-DbgFEe-VocgA@mail.gmail.com
I've updated the benchmarks to use make_immutable.  There was definite
improvements for Moose, but none of them were enough to change the
conclusions.

On Fri, Jul 24, 2015 at 10:54 PM Aran Deltac <bluefeet@gmail.com> wrote:

> Oh my, hard to believe I forgot make_immutable! I'll update it ASAP,
> thanks Dave. There is a friend of mine who created an issue on the project
> where he is showing some odd performance differences between different
> versions of perl, if anyone is interested in checking it out.
>
> On Fri, Jul 24, 2015 at 8:48 PM Dave Rolsky <autarch@urth.org> wrote:
>
>> On Sat, 25 Jul 2015, Aran Deltac wrote:
>>
>> > Hey all, I put together some benchmarks:
>> > https://github.com/bluefeet/Moo-se-Bench
>> >
>> > Let me know if you have any ideas/thoughts/criticisms.
>>
>> You didn't make your Moose classes immutable, which means everything is
>> going to be very, very, very slow.
>>
>> Moose makes attribute accessors inline by default, which is why it matches
>> Moose. If you make the class immutable, constructors are inlined, and I
>> suspect you'll see the two come much closer together in performance.
>>
>> That said, immutabilizing makes loading the class even slower.
>>
>>
>> -dave
>>
>> /*============================================================
>> http://VegGuide.org               http://blog.urth.org
>> Your guide to all that's veg      House Absolute(ly Pointless)
>> ============================================================*/
>>
>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About