|Subject:||Regex optimizer on \s+$ is "dumb as bricks"|
|From:||Aaron Sherman <ajs [...] ajs.com>|
|To:||perl6-bugs [...] perl.org|
|Date:||Thu, 21 Jul 2016 14:14:32 -0400|
When given a pathological input that will always fail, /\s+$/ seems to take the longest way home. Example in the IRC excerpt, below.
From the IRC discussion:
[14:11] <timotimo> m: use nqp; ((" " x 10000) ~ "end") ~~ / \s+$ /; say now - INIT now
[14:11] <+camelia> rakudo-moar 68afa3: OUTPUT«10.1804368␤»
[14:11] <timotimo> ah. no. it's definitely the regex :)
[14:11] <harmil> nice test case, though!
[14:11] <harmil> I'll submit this. At least it will be useful as a note for the future.
[14:11] <timotimo> our regex optimizer is dumb as bricks ;)