<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Taras,<div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 11 Apr 2016, at 19:38, Taras Zakharko <<a href="mailto:taras.zakharko@uzh.ch" class="">taras.zakharko@uzh.ch</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span class="" style="font-size: inherit; float: none; display: inline !important;">Your version might be faster for collection with expensive element access, but it should be slower for arrays and the like, as it involves additional intermediate structure allocations and copies.</span></div></blockquote></div><br class=""></div><div class="">No, not really. The cost of my enumeration and mapping is linear so they add nothing to the sorting order of complexity. Your two subscript calls inside the predicate, however, definitely do. In other words, your implementation will not be faster under any circumstances and it will in fact grow nonlinearly slower compared to the enumeration approach as the length of array increases…</div><div class=""><br class=""></div><div class="">milos</div><div class=""><br class=""></div><div class="">(My message appear to have bounced: I’m sorry if I end up sending multiple copies!)</div><div class=""><br class=""></div></body></html>