develooper Front page | perl.perl5.porters | Postings from March 2015

Re: OP_SIGNATURE

Thread Previous | Thread Next
From:
Zefram
Date:
March 6, 2015 06:15
Subject:
Re: OP_SIGNATURE
Message ID:
20150306061540.GA6410@fysh.org
Jan Dubois wrote:
>On Thu, Mar 5, 2015 at 10:57 AM, Paul "LeoNerd" Evans
><leonerd@leonerd.org.uk> wrote:
>> I honestly believe we can build something that makes even *THIS* code
>> faster:
>>
>>   sub foo
>>   {
>>      my $x = shift or die "Forgot to pass x";
>>      my $y = shift // 1;
>>      my $z = shift // $x++;
>>   }
>
>That's nice, but I doubt that anyone will actually spend the time to
>implement this in time for 5.22, so it won't be available today
>either.

How's Devel::GoFaster for a start?

https://metacpan.org/release/ZEFRAM/Devel-GoFaster-0.000

It doesn't do anything with the $z line, but reduces that sub from 22
runnable ops to 16.

-zefram

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