<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><a class="moz-txt-link-freetext" href="https://regex101.com">https://regex101.com</a> is your best friend.<br>
    </p>
    <br>
    <div class="moz-cite-prefix">27.04.16 17:32, Alfredo Rezinovsky
      пишет:<br>
    </div>
    <blockquote
cite="mid:CAMXC=Wt5W6UK1-qfFEDb2gJ8HQceQDoU5vcsY4rWtKvcNOT0LQ@mail.gmail.com"
      type="cite">
      <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 moz-do-not-send="true" href="http://www.facebook.com"
            target="_blank">www.facebook.com</a></div>
        <div><a moz-do-not-send="true" href="http://facebook.com"
            target="_blank">facebook.com</a></div>
        <div><a moz-do-not-send="true" href="http://www.google.com"
            target="_blank">www.google.com</a></div>
        <div><a moz-do-not-send="true" href="http://google.com">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><br>
        </div>
        -- <br>
        <div>Alfrenovsky</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
squid-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squid-cache.org/listinfo/squid-users">http://lists.squid-cache.org/listinfo/squid-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>