News for hackers. Stuff that matters.
Re:Mojolicious – Perl real-time web framework by otterley on Monday July 28, 2014 @12:07PM (#8097587)
Moose is very clever, but all that cleverness has a cost.

One of the things I like about Perl is that it offers tremendous performance, in addition to having an actually-useful debugger.

Subroutine calls in Perl aren't free; in fact they have a significant performance penalty if overused. And that's exactly what Moose uses, in droves.

Making Perl act like Ruby will also make it as slow as Ruby, and as difficult to debug.

Re:Mojolicious – Perl real-time web framework by mst on Monday July 28, 2014 @07:34PM (#8099918)
Both Moo and Moose generated inlined versions of their constructors and accessors that mean that there's only a single method call being involved.

As such, runtime is just as fast as any other perl code that uses accessor methods rather than poking into its own internals.

Plus, of course, once you've got a Devel::NYTProf profile showing that a particular accessor is a hot spot, you can still poke into your own internals for that particular purpose to resolve the bottleneck.

So, no, not really; generally you only pay a cost for the pieces of cleverness that you actually use, especially given the existence of Moo for fast-startup code where you don't need the MOP.

Re:Mojolicious – Perl real-time web framework by muraiki on Monday July 28, 2014 @12:34PM (#8097796)
Yes, so you can use Moose if you feel that it is necessary, Moo if you want something more lightweight, or nothing if you want speed. Just like there are modules for parameter type checking and all sorts of other nice features. My point is that Perl OO has some alternatives available from within Perl.

I don't know enough to vouch for Perl's performance vs other scripting languages, but I do know my boss (a very experienced Perl hacker) has a favorite saying: "If you wanted performance, why did you pick Perl?" :)

Re:Mojolicious – Perl real-time web framework by visarga on Monday July 28, 2014 @03:31PM (#8098863)
Total time = development time + run time

Perl might be one of the fastest languages from this point of view. I write 1%of my code in C and the rest in Perl for optimal efficiency.

Re:Mojolicious – Perl real-time web framework by otterley on Thursday July 31, 2014 @11:12AM (#8114545)
Probably because he's comparing Perl to C.
Re:Mojolicious – Perl real-time web framework by sigzero on Monday July 28, 2014 @05:34PM (#8099468)
They are looking to move part of Moose into the core I think. I haven't kept up much lately. They are also optimizing things in the newer versions.