<div dir="ltr">In case the concrete use-case is of interest: I want to switch PBQP's pooling CostAllocator from a std::set to a DenseSet*. PBQP::MDMatrices (the pool values) are more than twice as expensive to construct as the key values (PBPQ::Matrix).<div><br></div><div>Cheers,</div><div>Lang.</div><div><br></div><div>* This change is good for a ~4% reduction in total compile time on the nightly test suite when using -regalloc=pbqp.<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 19, 2014 at 11:51 AM, Lang Hames <span dir="ltr"><<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>This patch adds the find_as operation to DenseSet.</div><div><br></div><div>As with the corresponding method in DenseMap, this is useful if you have a DenseSet that contains expensive-to-contruct values, but there exists some cheap-to-construct type that can be used as a key for lookup.</div><div><br></div><div>Unit-test included.</div><div><br></div><div>Cheers,</div><div>Lang.</div></div>
</blockquote></div><br></div>