<div>I realize that a "step count" is not necessarily a true indication of performance of a regular expression, but it would be a valuable tool, and could provide valid performance indication when comparing two different regular expression approaches on a given target string.
</div>
<div> </div>
<div>I hope you'll keep it in mind, when you get around to extending/maintaining Regex Coach some time in the future.<br> </div>
<div>rgds,</div>
<div> </div>
<div>Morten<br> </div>
<div><span class="gmail_quote">On 5/2/05, <b class="gmail_sendername">Edi Weitz</b> <<a href="mailto:edi@agharta.de">edi@agharta.de</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Mon, 2 May 2005 16:05:46 +0200, Morten Hattesen <<a href="mailto:morten.hattesen@gmail.com">morten.hattesen@gmail.com
</a>> wrote:<br><br>> I really appreciate what Regex Coach has done for honing my Regular<br>> Expressions skills, and assisting debugging of complex expressions.<br>><br>> I frequently wish to optimize regular expressions (mainly by
<br>> reducing possible backtracking<br>> <a href="http://www.regular-expressions.info/atomic.html)">http://www.regular-expressions.info/atomic.html)</a>, but lack a way to<br>> test the relative performance between different regular expressions.
<br>><br>> To measure performance of a given regexp, I would really like the<br>> possibility of having Regex Coach count the total number of steps<br>> used by the underlying regexp engine for a given regexp search, or
<br>> some other meaningful performance indicator.<br>><br>> This could possibly be displayed when pressing the ">>" (show next<br>> match) button (regardless of whether a match was found or not). This
<br>> way, you can quickly try out different matching approaches, and get<br>> an indication of the relative performance.<br><br>Hi Morten!<br><br>I see a couple of problems here:<br><br>1. As you mentioned yourself already the number of "steps" used is not
<br> necessarily a good measure for the efficiency of a regular<br> expression.<br><br>2. The efficiency of a regular expression might depend heavily on the<br> target strings it's used with - a regex that's pretty good for a
<br> certain subset of all possible strings might be particularly bad<br> for another subset.<br><br>3. Plus, the efficiency of a regular expression will also depend on<br> the underlying implementation - even if, say, Perl and PHP use the
<br> same regex syntax they use different engines which employ different<br> optimization strategies.<br><br>Having said that, even if I had a good idea how to give performance<br>hints I wouldn't be able to add this to Regex Coach in the near future
<br>because I'm very busy with other projects.<br><br>Cheers,<br>Edi.<br></blockquote></div><br><br><br>-- <br>Morten Hattesen<br>Almindingen 56<br>DK-2870 Dyssegaard<br>Denmark<br>Tel: +45 3969 2212<br>Mobile: +45 2524 2114
<br>mailto:<a href="mailto:morten.hattesen@gmail.com">morten.hattesen@gmail.com</a>