Re: Benchmarking Moo(se)?

[email protected] (Aran Deltac) Sat, 25 Jul 2015 06:36:43 +0000
Newsgroups perl.moose
Message-ID <CAL5V4pFBB7459imwrZwvEOm=1mKHz0GbubGba-DbgFEe-VocgA@mail.gmail.com>
--001a1140ae8a9e0167051bad58a6
Content-Type: text/plain; charset=UTF-8

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 <[email protected]> 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 <[email protected]> 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)
>> ============================================================*/
>>
>

--001a1140ae8a9e0167051bad58a6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I&#39;ve updated the benchmarks to use make_immutable.=C2=
=A0 There was definite improvements for Moose, but none of them were enough=
 to change the conclusions.</div><br><div class=3D"gmail_quote"><div dir=3D=
"ltr">On Fri, Jul 24, 2015 at 10:54 PM Aran Deltac &lt;<a href=3D"mailto:bl=
[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div>Oh my, hard to believe I forgot make_immutable!  I&#3=
9;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.</div><br><div class=3D"gmail_quote"></div><div class=3D"gmail_quote"><=
div dir=3D"ltr">On Fri, Jul 24, 2015 at 8:48 PM Dave Rolsky &lt;<a href=3D"=
mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:<=
br></div></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote"=
 style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On=
 Sat, 25 Jul 2015, Aran Deltac wrote:<br>
<br>
&gt; Hey all, I put together some benchmarks:<br>
&gt; <a href=3D"https://github.com/bluefeet/Moo-se-Bench" rel=3D"noreferrer=
" target=3D"_blank">https://github.com/bluefeet/Moo-se-Bench</a><br>
&gt;<br>
&gt; Let me know if you have any ideas/thoughts/criticisms.<br>
<br>
You didn&#39;t make your Moose classes immutable, which means everything is=
<br>
going to be very, very, very slow.<br>
<br>
Moose makes attribute accessors inline by default, which is why it matches<=
br>
Moose. If you make the class immutable, constructors are inlined, and I<br>
suspect you&#39;ll see the two come much closer together in performance.<br=
>
<br>
That said, immutabilizing makes loading the class even slower.<br>
<br>
<br>
-dave<br>
<br>
/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
<a href=3D"http://VegGuide.org" rel=3D"noreferrer" target=3D"_blank">http:/=
/VegGuide.org</a>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<a =
href=3D"http://blog.urth.org" rel=3D"noreferrer" target=3D"_blank">http://b=
log.urth.org</a><br>
Your guide to all that&#39;s veg=C2=A0 =C2=A0 =C2=A0 House Absolute(ly Poin=
tless)<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/<br>
</blockquote></div></blockquote></div>

--001a1140ae8a9e0167051bad58a6--