<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 14, 2016 at 8:51 AM,  <span dir="ltr"><<a href="mailto:lists@lazygranch.com" target="_blank">lists@lazygranch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="en-US" style="background-color:rgb(255,255,255);line-height:initial">                                                                                      <div style="width:100%;font-size:initial;font-family:Calibri,'Slate Pro',sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)">I'd be shocked if the map function doesn't use a smart search scheme rather than check every item.  </div></div></blockquote><div><br></div><div>You're in for a bit of a shock then. It is a linear search :p Curious as to what you think it should look like instead?</div><div><br></div><div>Getting back to the original question though, a map should (_should_) be faster than building a larger and larger regex, particularly if the map is doing string comparison as opposed to regex searching for each map member. Building large alternation-oriented regular expressions can get pretty expensive rather quickly, though some of that will depend on the regex engine and compile-time options (e.g, are you using PCRE JIT, etc).</div></div></div></div>