<div dir="auto">BTW, I ran all the base image tests and all pass.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 1 May 2022 at 8:38 PM Luciano Notarfrancesco <<a href="mailto:luchiano@gmail.com">luchiano@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr">This changeset changes Collection>>#count: to be simpler and faster (with an Array of size 10000 I see a 35% speedup), and implements faster Bag>>#count: and Bag>>#collect: that avoids evaluating the block on multiple occurrences of the same element.<div><br></div><div>Both Bag>>#count: and Bag>>#collect: assume that the block is a function (i.e., returns the same result when evaluated twice on the same element). I think this is a fair assumption, and anyway we have the same assumption in Bag>>#select: (which I wrote in 1998, apparently).</div></div>
</blockquote></div></div>