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: nob...@puremagic.com
          Reporter: reaperunr...@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/gcxnuocczmdosombv...@forum.dlang.org

--

Reply via email to