www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Optimizing std.regex

reply Mike Parker <aldacron gmail.com> writes:
Dmitry mentioned here in the forums not long ago that he had 
squeezed some big performance improvements out of std.regex. His 
post on the D Blog describes how he managed to do it through an 
algorithmic optimization.

The post:
https://dlang.org/blog/2016/11/07/big-performance-improvement-for-std-regex/

Reddit:
https://www.reddit.com/r/programming/comments/5bm1bc/from_the_d_blog_optimizing_stdregex/
Nov 07 2016
parent reply Chris <wendlec tcd.ie> writes:
On Monday, 7 November 2016 at 13:13:24 UTC, Mike Parker wrote:
 Dmitry mentioned here in the forums not long ago that he had 
 squeezed some big performance improvements out of std.regex. 
 His post on the D Blog describes how he managed to do it 
 through an algorithmic optimization.

 The post:
 https://dlang.org/blog/2016/11/07/big-performance-improvement-for-std-regex/

 Reddit:
 https://www.reddit.com/r/programming/comments/5bm1bc/from_the_d_blog_optimizing_stdregex/
Great job! Would it be possible (or indeed worth it) to create a similar engine for general text processing / string handling?
Nov 08 2016
parent Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On 11/8/16 12:23 PM, Chris wrote:
 On Monday, 7 November 2016 at 13:13:24 UTC, Mike Parker wrote:
 Dmitry mentioned here in the forums not long ago that he had squeezed
 some big performance improvements out of std.regex. His post on the D
 Blog describes how he managed to do it through an algorithmic
 optimization.

 The post:
 https://dlang.org/blog/2016/11/07/big-performance-improvement-for-std-regex/


 Reddit:
 https://www.reddit.com/r/programming/comments/5bm1bc/from_the_d_blog_optimizing_stdregex/
Great job! Would it be possible (or indeed worth it) to create a similar engine for general text processing / string handling?
Depends on what do you mean general - hard to find something more general then regex for text processing. Or do you mean using Bit NFA directly without the regex layer? It should be possible, however one needs to keep in mind the limitation - 32 or 64 states in total. --- Dmitry Olshansky
Nov 08 2016