[Csnd] DSP quirk that causes increased CPU usage?
Date | 2013-11-19 11:50 |
From | Jeff Taylor |
Subject | [Csnd] DSP quirk that causes increased CPU usage? |
I recall reading somewhere, and I think it was on this mailing list, about an interesting quirk of how numbers are computed on computers. Signals satisfying certain conditions cause an increase in CPU usage, and these conditions are ones that could easily occur in everyday usage. Thus you would want to keep the effect in mind as you program. I was thinking it was something like very low amplitude signals or slight DC offsets. Does anyone have any idea what I am talking about? I've been looking through my notes but I can't seem to find this particular info and I would like to refresh my memory on the topic. I will accept the answer that I dreamed it all up! -- Electronically, Jeff Taylor |
Date | 2013-11-19 13:56 |
From | jpff@cs.bath.ac.uk |
Subject | [Csnd] Re: |
Attachments | None |
Date | 2013-11-19 14:19 |
From | Michael Gogins |
Subject | Re: [Csnd] DSP quirk that causes increased CPU usage? |
This is called the "denormal problem." It is caused when floating point numbers have an exponent that is too small for the number of bits allocated to the exponent, so put leading zeros into the significand. You can obviate the problem by adding a bit of low amplitude white noise to the signal. This may or may not actually be a problem for you. You can look up your CPU to see if denormal numers are handled in hardware, thus no problem, or in software, thus there is a problem. Or you can write a test to experimentally determine if performance suffers with denomals. Hope this helps, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Tue, Nov 19, 2013 at 6:50 AM, Jeff Taylor <taylor.jeff.d@gmail.com> wrote:
|
Date | 2013-11-19 15:14 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd] DSP quirk that causes increased CPU usage? |
And the denorm opcode is good for adding that low level noise. Very handy. Oeyvind 2013/11/19 Michael Gogins |
Date | 2013-11-19 15:22 |
From | Jeff Taylor |
Subject | Re: [Csnd] DSP quirk that causes increased CPU usage? |
Thanks everyone, that is exactly the info I was looking for! -- Electronically, Jeff Taylor On Tue, Nov 19, 2013 at 9:14 AM, Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no> wrote: And the denorm opcode is good for adding that low level noise. Very handy. |
Date | 2013-11-19 19:47 |
From | Jan Baumgart |
Subject | Re: [Csnd] DSP quirk that causes increased CPU usage? |
They are called denormal numbers. http://en.wikipedia.org/wiki/Denormal_number cheers, Jan On 11/19/13 12:50 PM, Jeff Taylor wrote: > I recall reading somewhere, and I think it was on this mailing list, > about an interesting quirk of how numbers are computed on computers. > Signals satisfying certain conditions cause an increase in CPU usage, > and these conditions are ones that could easily occur in everyday > usage. Thus you would want to keep the effect in mind as you program. > I was thinking it was something like very low amplitude signals or > slight DC offsets. > > Does anyone have any idea what I am talking about? I've been looking > through my notes but I can't seem to find this particular info and I > would like to refresh my memory on the topic. I will accept the answer > that I dreamed it all up! > > -- > Electronically, > Jeff Taylor |