digitalmars.D - Regular Expressions
- Craig Black (8/8) Feb 16 2006 With all this discussion of $ stuff for regular expressions, I was
- pragma (13/21) Feb 16 2006 That's a good question. I never did any timed comparisons of the templa...
-
Walter Bright
(3/4)
Feb 16 2006
Sure. Compile with -profile
.
With all this discussion of $ stuff for regular expressions, I was wondering, aren't the templated compile-time regular expressions eventually going to replace the current regular expression implementation? I would assume they will be much much faster. I think we should keep that in mind when adding syntax sugar to the language. We should ensure that whatever syntax sugar is added, it will be compatible with the newer faster regex stuff. -Craig
Feb 16 2006
In article <dt2jvd$14s1$1 digitaldaemon.com>, Craig Black says...With all this discussion of $ stuff for regular expressions, I was wondering, aren't the templated compile-time regular expressions eventually going to replace the current regular expression implementation? I would assume they will be much much faster. I think we should keep that in mind when adding syntax sugar to the language. We should ensure that whatever syntax sugar is added, it will be compatible with the newer faster regex stuff. -CraigThat's a good question. I never did any timed comparisons of the template solution versus Walter's implementation. Although, making the templated version opMatch friendly should be pretty easy to do. Anyone have any nanosecond (Windows) timing code handy? Anyway, I really feel (as others do) that tying the evaulation of "<string> <opMatch> <operand>" to std.regexp is not the ideal way forward (but it does work). If Walter were to move beyond this to a compile-time regex operation instead, I'd insist that a non-library approach be used as it would invariably yield a faster expression processor. However, the unfortunate consequence of that would be a harder to implement language standard as it would require a whole 'nother codegen engine within the compiler itself. - Eric Anderton at yahoo
Feb 16 2006
"pragma" <pragma_member pathlink.com> wrote in message news:dt2lrp$16dt$1 digitaldaemon.com...Anyone have any nanosecond (Windows) timing code handy?Sure. Compile with -profile <g>.
Feb 16 2006