<div dir="ltr">The documentation is correct. Thinking about key lookups as O(1) is what led to this problem...<div><a href="http://www.ocert.org/advisories/ocert-2011-003.html">http://www.ocert.org/advisories/ocert-2011-003.html</a><br></div><div><br></div><div>-david</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 21, 2016 at 1:36 PM, Dave Abrahams <span dir="ltr"><<a href="mailto:dabrahams@apple.com" target="_blank">dabrahams@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
on Thu Jan 21 2016, David Turnbull <dturnbull-AT-gmail.com> wrote:<br>
<br>
> On Thu, Jan 21, 2016 at 12:23 PM, Dave Abrahams via swift-users <<br>
> <a href="mailto:swift-users@swift.org">swift-users@swift.org</a>> wrote:<br>
><br>
>> Swift Dictionaries are documented as having O(1) lookup.<br>
>><br>
><br>
> Only the lookup by index is O(1). Lookup by key is not specified.<br>
<br>
</span>Then that's a bug in our documentation; please file a ticket! It should<br>
guarantee O(1) as long as the Dictionary isn't backed by NSDictionary<br>
and the hash function is good.<br>
<br>
</blockquote></div><br></div>