<div dir="ltr"><div>Wrong.</div><div><br></div><div>When you test regex, you can see this:</div><div><br></div><div><a href="https://i1.someimage.com/Ae6P3is.png">https://i1.someimage.com/Ae6P3is.png</a></div><div><br></div><div>this:</div><div><br></div><div><a href="https://i1.someimage.com/70Y4kl9.png">https://i1.someimage.com/70Y4kl9.png</a></div><div><br></div><div>and this:</div><div><br></div><div><a href="https://i1.someimage.com/rNjCjVX.png">https://i1.someimage.com/rNjCjVX.png</a></div><div><br></div><div>As you can see, green bar in upper right corner shows you steps count when parse and _execute_ regex.</div><div><br></div><div>This is performance info you required. This is obvious.</div><div><br></div><div>More steps - slower exec. So odd you can't see obvious.</div><div>Otherwise only regex gurus/creator can tell you how fast/slow is any regex. Regex is magic.</div><div><br></div><div>Also, just for minute, you asking in wrong place. This is squid, not regex.</div><div><br></div><div>Best rgrds, Yuri</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-27 19:11 GMT+06:00 Alfredo Rezinovsky <span dir="ltr"><<a href="mailto:alfrenovsky@gmail.com" target="_blank">alfrenovsky@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Not my question. I'm asking about performance<div class="gmail_extra"><br><div class="gmail_quote">2016-04-27 9:09 GMT-03:00 Yuri Voinov <span dir="ltr"><<a href="mailto:yvoinov@gmail.com" target="_blank">yvoinov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p><a href="https://regex101.com" target="_blank">https://regex101.com</a> is your best friend.<br>
    </p>
    <br>
    <div>27.04.16 17:32, Alfredo Rezinovsky
      пишет:<br>
    </div>
    <blockquote type="cite"><div><div>
      <div dir="ltr">
        <div>I saw in debug log that when an ACL has many regexes each
          one is compared sequentially.</div>
        <div><br>
        </div>
        <div>If I have</div>
        <div><br>
        </div>
        <div><a href="http://www.facebook.com" target="_blank">www.facebook.com</a></div>
        <div><a href="http://facebook.com" target="_blank">facebook.com</a></div>
        <div><a href="http://www.google.com" target="_blank">www.google.com</a></div>
        <div><a href="http://google.com" target="_blank">google.com</a> </div>
        <div><br>
        </div>
        <div>If will be faster to check just ONE optimized regex like
          (www\.)?(facebook|google).com than the previous three?<br>
        </div>
        <br clear="all">
        <div>I'm really talking about optimizing about 3000 url regexes
          in one huge regex because comparing each and every url to 3000
          regexes is too slow.<br>
        </div>
        <div><br>
        </div>
        <div>I know using
          (www\.facebook\.com)|(facebook\.com)|(www\.google\.com)|(google\.com)
          with PCRE will produce the same optimized result as
          (www\.)?(facebook|google)\.com. Squid uses GnuRegex. Does
          GNURegex lib optimizes this as well ?</div>
        <div><br>
        </div>
        </div></div></div></blockquote></div><br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Alfrenovsky</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">-= WBR, Yuri.<br>                    Powered by Google =-</div>
</div>