Atte; this is a wonderful project.<br><br>Some notes on your method; you are using a file (and hence a shred) per Ugen. I believe there to be some small overhead for the usage of a shred so I believe you may be ending up with slightly high numbers. I once tested the cpu cost of sporking a thousand (maybe ten thousand) shreds that were all just waiting for a event and this took some small but signifficant amount of cpu.<br>
<br>Maybe the most remarkable result to me here is the cost of setting a SndBuf to loop; that&#39;s a rather big hit for what I imagine to come down to a single if-then instruction per sample. I also wonder why Pan2 is more expensive than 2 Gains; we could use 2 Gain Ugens (and a function) to emulate it, maybe this instead tests a higher cost for forcing the DAC to operate in stereo? Finally, like you,  I wonder about the different normalised results for the two tests of PRCRev that you performed; some difference would be understandable, for example the VM itself takes some CPU which would be scalled along with the whole thing but this looks like a rather signifficant difference to me. I wonder how we could explain that.<br>
<br>As for further tests that might be useful/ interesting; you could compare the Blit osc&#39;s to the regular ones (as well as try to deterimine what -if any- difference the amount of harmonics makes). Another interesting thing to compare might be LiSa with multiple voices v.s. as many copies of SndBuf.<br>
<br>If at all possible it would also be interesting to fully automate a series of tests like this so we could compare versions of ChucK later. We might be interested in the exact difference that a future implementation of block processing could make, for example.<br>
<br>The list goes on; we might want to know the cost of member functions like the .freq() parameter of filters, we may even want to know the cost of certain operations. For example in the case of the looping SndBuf above; we could make it loop using a &quot;if the pointer goes out of range put it back at the start&quot; construct or we could perform a modulo on the same pointer (which might carry the remainder, which would probably be desirable there), what would be cheaper in ChucK?<br>
<br>Those last tests would probably be going too far and be too detailed but we know very little about the price of such operations in ChucK.<br><br><br>Thanks again for sharing your results so far!<br>Yours,<br>Kas.<br><br>
<br><div class="gmail_quote">2009/3/10 Atte André Jensen <span dir="ltr">&lt;<a href="mailto:atte.jensen@gmail.com">atte.jensen@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br>
<br>
We all know that chuck is not the fastest audio software out there. But I guess like me you&#39;ve all found ways to work around that. I often found myself wondering &quot;how much can I save by disconnecting this UGen&quot; or &quot;exactly how expensive is another NRev&quot;.<br>

<br>
For this purpose I started to do some benchmarking in the form of a bunch of .ck files and a bash script. My initial results are here:<br>
<br>
<a href="http://atte.dk/chuck/results.txt" target="_blank">http://atte.dk/chuck/results.txt</a><br>
<br>
The first line is &quot;chuck --loop&quot;, so the wm alone. &quot;nb&quot; is the number of files, &quot;cpu&quot; is the cpu usage as reported by htop on my laptop (2Ghz Intel dualcore), and &quot;cpu normalized&quot; is cpu-usage (simple multiplication) at nb=100.<br>

<br>
Of course this doesn&#39;t make sense without seeing the .ck files, so I&#39;ve put them here:<br>
<br>
<a href="http://atte.dk/chuck/performance_tests.tgz" target="_blank">http://atte.dk/chuck/performance_tests.tgz</a><br>
<br>
I&#39;m quite aware of that this approach is very un-scientific, so any input on how to improve it is more than welcome. Esp. I&#39;m wondering how 10 * PRCRev = 7% and 50 * PRCRev = 46% (should have been 35%).<br>
<br>
I&#39;m gonna continue my tests, but you&#39;re all welcome to supply files for testing. Maybe this should all end up on the wiki?<br>
<br>
NB: This is in no way a critique of the developers. Sure I would love to see a faster chuck, but we still love it and use it.<br><font color="#888888">
<br>
-- <br>
Atte<br>
<br>
<a href="http://atte.dk" target="_blank">http://atte.dk</a>    <a href="http://modlys.dk" target="_blank">http://modlys.dk</a><br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</font></blockquote></div><br>