digitalmars.D.bugs - [Issue 12690] New: std.regex BacktrackingMatcher bmatch is faster
- via Digitalmars-d-bugs (31/31) May 02 2014 https://issues.dlang.org/show_...
https://issues.dlang.org/show_bug.cgi?id=12690 Issue ID: 12690 Summary: std.regex BacktrackingMatcher bmatch is faster than ThompsonMatcher but discouraged Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: Phobos Assignee: nobody puremagic.com Reporter: yxcvbasdfgqwert02 gmx.de Created attachment 1348 --> https://issues.dlang.org/attachment.cgi?id=1348&action=edit Source code for test case The discouraged function std.regex.bmatch is significantly faster then std.regex.match. The attached test case already shows the performance difference with a simple expression and a small haystack. In my real-world program, both are way more complex and it's many expressions against many haystacks. Most expressions match, only a few of them not. The performance difference is a knock-out criterion. Total real-world program running time: Using bmatch: 5 seconds Using match: 47 seconds All benchmarks with dmd 2.065 on Ubuntu 64 bit, compiled with -release. Unfortunately I'm not allowed to post the source code or haystack of the real-world application, so the small test case has to be enough. --
May 02 2014