Given time, I can concoct a test case where the percentage of equals<div>varies between 0 and 100%. But whatever these results might be, I</div><div>think that the findings up to now indicate that collectSet should be left</div>
<div>as it is, and any desire for a different behaviour should be satisfied</div><div>by a separate accumulate function, say, collectBag, returning the</div><div>key set of an IdentityHashMap. (Clarifying the reasons of the implementation</div>
<div>differences might be interesting.)</div><div><br></div><div>-W</div><div><br><div class="gmail_quote">On 1 March 2012 00:11, SirMungus <span dir="ltr">&lt;<a href="mailto:Patrick_Rusk@ssga.com">Patrick_Rusk@ssga.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
SirMungus wrote<br>
<div class="im">&gt;<br>
&gt; So, there would undoubtedly be a performance impact, even not taking into<br>
&gt; account the &quot;new HashSet()&quot; in the getResults() call. Whether it would be<br>
&gt; significant enough in real world scenarios to warrant a much more complex<br>
&gt; implementation requires more knowledge of Drools&#39;s user base than I<br>
&gt; possess, for sure. My guess is that Wolfgang&#39;s second scenario above is<br>
&gt; generally unrealistic. But, if it is routine for rules with collectSet()<br>
</div>&gt; to end up with sets involving thousands of objects like the /second/<br>
<div class="im">&gt; scenario, that could certainly be an issue.<br>
&gt;<br>
</div>Goodness. I meant to say that the first scenario (instead of &quot;second&quot;<br>
italicized above) could potentially be realistic. The larger the sets,<br>
larger the penalty each time getResults() is called.<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/BUG-5-3-0-Final-CollectSetAccumulateFunction-should-probably-use-IdentityHashMap-internally-tp3774079p3788970.html" target="_blank">http://drools.46999.n3.nabble.com/BUG-5-3-0-Final-CollectSetAccumulateFunction-should-probably-use-IdentityHashMap-internally-tp3774079p3788970.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the Drools: Developer (committer) mailing list mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</div></div></blockquote></div><br></div>