Skip Menu |
Report information
Id: 125671
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: rob [at] hoelz.ro
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Defining a prefix * operator seriously slows down parse of Perl 6 code
Download (untitled) / with headers
text/plain 166b
See the attached file. When I uncomment the line that defines a * prefix operator (ala pointer dereferencing in C), the runtime for the script is five times as long.
Subject: test.pl
Download test.pl
text/x-perl 200b
class MyThing { has $.value; } # uncommenting this results in a 5x long compilation time #sub prefix:<*>(MyThing $thing) { $thing.value } my $thing = MyThing.new(:value<foo>); say $thing.value;
Download (untitled) / with headers
text/plain 630b
Also seeing similar in latest Rakudo: david@X346:~$ perl6 -v This is Rakudo version 2017.03-206-g2ddfa26 built on MoarVM version 2017.03-115-ge8231a3 implementing Perl 6.c. david@X346:~$ time perl6 -e'sub prefix:<n>($) {42};' real 0m1.336s user 0m1.244s sys 0m0.092s Versus a simple sub: david@X346:~$ time perl6 -e'sub n {42}' real 0m0.331s user 0m0.268s sys 0m0.060s On Thu, 23 Jul 2015 21:01:55 -0700, rob@hoelz.ro wrote: Show quoted text
> See the attached file. > > When I uncomment the line that defines a * prefix operator (ala > pointer dereferencing in C), the runtime for the script is five times > as long.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org