On Monday 23 January 2006 21:56, Matt Ingalls wrote: > On Jan 23, 2006, at 12:42 PM, Istvan Varga wrote: > > > On Monday 23 January 2006 20:20, Matt Ingalls wrote: > > > >> is that really true? when i looked into this [ about 5 years ago! ] > >> all i found was some bit-wise operations on index increments for > >> oscillators and stuff -- it would be no big deal to replace the > >> bit-wise > >> stuff with a modulo or if statement? > > > > Simply replacing a & with a % is not enough, as the latter cannot > > as we say in california, "duh!" > > > deal with negative numbers correctly, so you need an additional > > if statement to fix that. Also, a % is much slower than a &. > > how much? i seriously doubt it's worth the speed gain.. With two buils that are identical except one uses & in the oscil.kk opcode, while another uses %, trapped.csd renders about 20% slower on my machine. Note that this is the result of changing a single opcode; the CSD uses many other opcodes as well, so the slowdown of oscil itself is more significant. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net