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: [email protected]
          Reporter: [email protected]

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/[email protected]

--

Reply via email to