[sdiy] help understanding circular buffers for delay line

Matthew Smith matt at smiffytech.com
Fri Mar 2 09:33:59 CET 2012


Quoth Andrew Simper at 02/03/12 17:12...
...
> Before any statements can be made about one thing being quicker than
> another you really need to run tests on the target architecture and
> measure cpu usage. Using '&' is just easier to code to get up and
> running if you have a power of 2 buffer that you want to wrap around.

It's not speed that's of concern to me, it's predictability.

If I do a logical operation on a number, the same number of CPU cycles 
should occur each time. When a conditional situation arises (my original 
if statements,) depending on the outcome of the comparison, operations 
of differing numbers of CPU cycles will occur.  The more predictable the 
behaviour, the better - at least in my mind.

-- 
Matthew Smith

Business: http://www.smiffytech.com
Blog:     http://www.smiffysplace.com
Linkedin: http://www.linkedin.com/in/smiffy
Flickr:   http://www.flickr.com/photos/msmiffy
Twitter:  http://twitter.com/smiffy

ABN 16 391 203 815



More information about the Synth-diy mailing list