-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optiimzation - avoid log() calls in inner loop #9
Comments
It is best to have the values on the dsp side be linear and let the GUI deal with the calculations for log scale. |
Does this helps ? |
I dont think so. we want to avoid some calculations altogether, the issue is not optimization but one of simply not doing them. |
Then this C++ conversion code might help. |
I don't know how to make use of the |
This Taylor-approximation looked interesting to me. But further investigation showed, that this cannot solve our problem. This Python code
produces the image |
Use case of converters here https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/gui/APIUI.h |
Reading the produced C++ code of the final product now, the log here is really just the tip of the iceberg and would just be a micro optimization. |
https://github.com/trummerschlunk/soundsgood/blob/e8eb9ba756971c22c5da8ca5a1f887f9f342faac/soundsgood.dsp#L348
The value is for display only. With a custom GUI it's preferable to have the GUI call it.
Currently FAUST compiles this into the inner loop and calls
log10()
for each sample!Since it's for display only, accuracy is not required you might want to investigate a fast_log implementation
https://www.flipcode.com/archives/Fast_log_Function.shtml
The text was updated successfully, but these errors were encountered: