how do you "turn off denormals"
-
@aeva For audio?
Mostly you just won't need it if your IIR filters and delay lines (these are the two main culprits) just do this magic supah sekrit fixup on their input:
input += 1e-30f;
(or, in some cases, put it on the output for the feedback signals)
-
-
-
-
@aeva It's fine for audio code but when you turn it on, you generally want to put it in a scope guard thingy that saves the original MXCSR and restores it after (way out in the outer loop, not per function or anything, toggling that isn't super cheap) because it changes the results of some float calcs and breaks a few rules that while not _super_ important might trip you up
-
undefined oblomov@sociale.network shared this topic
-
holy shit.
ok so mollytime had this perf problem that's been driving me lowkey crazy since i implemented polyphony where sometimes a patch's load % would shoot up super high depending on which midi I was feeding it, and like, it shouldn't *do* that.
switching on DAZ and FTZ just now brought a case that was hitting 45% load down to 16% holy smokes
-
@glyph nope. is it good
-
@glyph nope. is it good
@aeva yeah. it's where I learned about this problem. I'd experienced a few side effects of it before but never really understood the underlying cause. (sometimes my code runs *near* signal processing but I've never done it directly)
also this is a banger too, just to appreciate a totally different and much wackier way that denormals can really hurt you https://issues.chromium.org/issues/382005099#comment10
-
@aeva yeah. it's where I learned about this problem. I'd experienced a few side effects of it before but never really understood the underlying cause. (sometimes my code runs *near* signal processing but I've never done it directly)
also this is a banger too, just to appreciate a totally different and much wackier way that denormals can really hurt you https://issues.chromium.org/issues/382005099#comment10
@glyph I realized it was probably the problem when I was digging through @TomF 's blog the other day looking for his blog post imploring people to not do the thing I'm doing in another project to find the tolerances on the thing and found a different blog on a completely different topic and it obliquely mentioned shutting off denormals to improve perf and i was like wait i remember hearing something about that somewheres
-
@aeva yeah. it's where I learned about this problem. I'd experienced a few side effects of it before but never really understood the underlying cause. (sometimes my code runs *near* signal processing but I've never done it directly)
also this is a banger too, just to appreciate a totally different and much wackier way that denormals can really hurt you https://issues.chromium.org/issues/382005099#comment10
@glyph oh god i just started reading this. i hate the "we must make computers unusably slow at all costs. for security." people so so very much
-
@glyph I realized it was probably the problem when I was digging through @TomF 's blog the other day looking for his blog post imploring people to not do the thing I'm doing in another project to find the tolerances on the thing and found a different blog on a completely different topic and it obliquely mentioned shutting off denormals to improve perf and i was like wait i remember hearing something about that somewheres
-
@glyph I realized it was probably the problem when I was digging through @TomF 's blog the other day looking for his blog post imploring people to not do the thing I'm doing in another project to find the tolerances on the thing and found a different blog on a completely different topic and it obliquely mentioned shutting off denormals to improve perf and i was like wait i remember hearing something about that somewheres
-
-
-
-
@oblomov @aeva @glyph Sure, but usually normal audio processing doesn't produce denormals. The denormals arise because there's a feedback with a sub-1.0 gain, which eventually drains to very small numbers, and then denormals. If you flush the output, as soon as it gets there it just goes to zero immediately.
-
@oblomov @aeva @glyph Sure, but usually normal audio processing doesn't produce denormals. The denormals arise because there's a feedback with a sub-1.0 gain, which eventually drains to very small numbers, and then denormals. If you flush the output, as soon as it gets there it just goes to zero immediately.
-
@TomF @glyph specifically it was the one about using fixed point coordinates for objects. I'm still considering how to make that work, but I'd like to use jolt and jolt only speaks floats, and I am not expecting GLES2 GLSL to provide everything I need to do what I was doing before on the rendering side either. I'm probably going to use tile relative system instead on the shader side, and whatever will require as little translation on the CPU side.
-
@TomF @glyph specifically it was the one about using fixed point coordinates for objects. I'm still considering how to make that work, but I'd like to use jolt and jolt only speaks floats, and I am not expecting GLES2 GLSL to provide everything I need to do what I was doing before on the rendering side either. I'm probably going to use tile relative system instead on the shader side, and whatever will require as little translation on the CPU side.
-