<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hans:<div><br></div><div>Of course I'd love to use a hashmap. &nbsp;But how do you get one in Chuck? &nbsp;AFIK, the existing chuckain "hash array" lacks a means to iterate over its contents.</div><div><br></div><div>- Rob</div><div><br><div><div>On 30 Sep 2009, at 02:03, Hans Aberg wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On 30 Sep 2009, at 02:13, Robert Poor wrote:<br><br><blockquote type="cite">I guess the question should be: what's the fastest way to maintain a *set* of objects (i.e. a collection in which an object may only appear once) with the usual operations for insertion, deletion and iteration?<br></blockquote><br>For lookup tables, if you do not need to compare the keys, a hash map is fastest - time complexity O(1), otherwise a balanced tree (like C++ std::map) - complexity O(log n). There might be some C++ hash map classes at &lt;<a href="http://www.boost.org/">http://www.boost.org/</a>&gt;. But if n is small and use not too intense, just about any container will do.<br><br> &nbsp;Hans<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote></div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-size: medium;"><br></span></div></div></span></div></div></span></div></div></body></html>