[Mono-dev] Weird performance problems possibly due to floats and precision issues?
kumpera at gmail.com
Wed Sep 21 14:34:39 EDT 2011
Are you on 32 or 64 bits? Our FP code is quite different on those two.
Can you have a run on .NET without the added denormal hack? We strike to
be as compatible as possible, specially when it comes to numerical stability
On Wed, Sep 21, 2011 at 10:00 AM, noisecrime <noise at noisecrime.com> wrote:
> Good news, looks like I may have found a solution to the problem.
> Though I probably need to do some further testing, it does indeed appear to
> be denormals causing the issue. After reading up on it online its been a
> very common problem for DSP/audio developers and thankfully there appears
> be a simple solution.
> This page describes the problem and various solutions
> I went with the simplest
> “On every location in the code where denormalization might occur, just add
> 1.0e-24 to the float value, then subtract it again, that should fix it.”
> Doing that in just the lin_solve function such as
> x[i+N2J] = denormal + (( x0[i+N2J] + a * (x[i-1+N2J] + x[i+1+N2J] +
> x[i+N2JN] + x[i+N2JP]) ) * oneOverC);
> x[i+N2J] -= denormal;
> gives constant performance, though I suspect i'll need to add it to a few
> other places in the code as well.
> View this message in context:
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list