You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<masak> r: my $N = 5; my $rx = "a?" x $N ~ "a" x $N; say "a" x $N ~~ /<$rx>/
<camelia> rakudo c0814a: OUTPUT«「aaaaa」»
<masak> r: my $N = 32; my $rx = "a?" x $N ~ "a" x $N; say "a" x $N ~~ /<$rx>/
<tadzik> moritz: oh yes, that'd work too
<camelia> rakudo c0814a: OUTPUT«(timeout)»
* masak submits rakudobug
* masak throws in http://swtch.com/~rsc/regexp/regexp1.html as a reference
As that page shows, this can be made into a polynomial thing rather
than an exponential one, by dealing directly with the NFA. NQP's regex
engine should be perfectly suited for this already.
Even disregarding that, there are various optimization tricks (à la
Perl 5) that can be done to make such a regex do less work.
Migrated from rt.perl.org#119865 (status was 'new')
Searchable as RT119865$
The text was updated successfully, but these errors were encountered: