<div dir="ltr">Thanks Elihah, that's basically what I'm doing. <div><br></div><div>Is there a speed advantage to using float-vector-set! over plain old set! ?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 2, 2022 at 5:47 PM Elijah Stone <<a href="mailto:elronnd@elronnd.net">elronnd@elronnd.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Sorry, should be<br>
<br>
(do ((i 0 (+ 1 i))<br>
(l (length v)))<br>
((>= i l))<br>
(float-vector-set! v i (f (float-vector-ref v i))))<br>
<br>
On Sat, 2 Apr 2022, Elijah Stone wrote:<br>
<br>
> Probably:<br>
><br>
> (do ((i 0 (+ 1 i))<br>
> (l (length v)))<br>
> (>= i l)<br>
> (float-vector-set! v i (f (float-vector-ref v i))))<br>
><br>
> Obviously substituting int-vector-* or byte-vector-* if appropriate.<br>
><br>
> That said, if performance is really important, I might just write the code in <br>
> c.<br>
><br>
> On Sat, 2 Apr 2022, Iain Duncan wrote:<br>
><br>
>> Hi all, I'm mapping some transforms over vectors in a part of the code that <br>
>> I need to have run as efficiently as possible. I'm hoping someone can tell <br>
>> me what the fastest running approach to this is. I would like to leave the <br>
>> data as vector as it is used in a framebuffer at the C level.<br>
>> thanks!<br>
>> iain<br>
>> <br>
>> <br>
> _______________________________________________<br>
> Cmdist mailing list<br>
> <a href="mailto:Cmdist@ccrma.stanford.edu" target="_blank">Cmdist@ccrma.stanford.edu</a><br>
> <a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist" rel="noreferrer" target="_blank">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
><br>
_______________________________________________<br>
Cmdist mailing list<br>
<a href="mailto:Cmdist@ccrma.stanford.edu" target="_blank">Cmdist@ccrma.stanford.edu</a><br>
<a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist" rel="noreferrer" target="_blank">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
</blockquote></div>