<p>It can optimize setelement used in a loop? I'd be surprised, although pleasantly so.<br>
(I didn't even know it could handle non-fixed indexes, but then I am not generally very familiar with it.)<br>
One more thing to research...</p>
<div class="gmail_quote">Den 10/07/2012 10.10 skrev "Anthony Ramine" <<a href="mailto:n.oxyde@gmail.com">n.oxyde@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I wouldn't be so sure about that, you need to check whether the destructive updates pass (dsetel) does its magic here.<br>
<br>
--<br>
Anthony Ramine<br>
<br>
Le 10 juil. 2012 à 01:50, Erik Søe Sørensen a écrit :<br>
<br>
> Using setelement is a bad idea, at least unless the tuples are very small: the cost in time and allocation is n^2.<br>
> A better scaling approach is to use tuple_to_list + map + list_to_tuple; that should be linear, and my guess is that it'd be faster even for small tuple sizes.<br>
> (For the actual n=4 case, I don't know which is better; must measure...)<br>
> /Erik<br>
</blockquote></div>