develooper Front page | perl.perl5.porters | Postings from December 2009

Re: Pod::Abstract 0.19 generating warnings on 5.11.3

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
December 29, 2009 19:17
Subject:
Re: Pod::Abstract 0.19 generating warnings on 5.11.3
Message ID:
20091230031257.GC12994@klangraum.plasmasturm.org
* Eric Brine <ikegami@adaelis.com> [2009-12-29 15:50]:
> On Mon, Dec 28, 2009 at 1:34 PM, Aristotle Pagaltzis <pagaltzis@gmx.de>wrote:
> > The `eval` is redundant. If you’re going to use `eval` you
> > can just say this:
> >
> >    eval { return $val->isa($class) };
> >    $class eq ref $val;
> >
> > But this is   s   l   o   w  .
>
> It's no slower than the alternative you suggested
>
> Positive tests
>          Rate eval  can
> eval 639402/s   --  -0%
> can  641049/s   0%   --
> Negative tests
>          Rate eval  can
> eval 791961/s   --  -2%
> can  808965/s   2%   --

Well, only slightly slower. Interesting. And nice to know. It
used to be quite a lot slower. (I wonder if `eval` got faster,
or `UNIVERSAL::can` slower, or some of both…)

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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