[Issue 14504] New: Regex Optimizer doesn't merge equivalent threads.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Apr 26 07:30:41 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14504
Issue ID: 14504
Summary: Regex Optimizer doesn't merge equivalent threads.
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: reaperunreal at gmail.com
Given the following code:
import std.stdio, std.regex;
void main(string argv[]) {
string m = argv[1];
auto p =
ctRegex!("a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
if (match(m, p)) {
writeln("match");
} else {
writeln("no match");
}
}
Compile time becomes extremely long due to the regex optimizer not merging
equivalent threads as explained in the forum post here:
http://forum.dlang.org/post/gcxnuocczmdosombvalx@forum.dlang.org
--
More information about the Digitalmars-d-bugs
mailing list