-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Optimise usage of pow using fast equivalent and exp2 #7548
Conversation
Don't use (Note that |
I'd rather we used Also, in addition to Lost Robot's comment on the inaccuracy of the |
Noted
I have reverted the of calls to
I don't have profiling set up in this branch. I'll try something tho. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested it, but it looks good
I couldn't see much performance improvement from profiling. @sakertooth do we still want this. Atleast there's no change in behaviour. |
I generally always prefer using what is provided in the standard library by default. So, if the optimized |
In some places, the updated pow function is needed but in other places, not really, but I would say, change everything as |
@sakertooth we fine with pushing this as is, or should I enforce the |
My stance is the same still: I would prefer |
Should I revert the ones in monstro and |
I didn't get an answer here. Even if i should make the change, I can't for now because my laptop display is gone (posted that story on discord). I'm just a bit too enthusiastic to hit that button. |
Apologies for the delay, I'm reviewing this right now @Rossmaxx. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, just a few suggestions. I also think it is okay to leave the fastPow10f
changes in Monstro. Maybe not DrumSynth since we load .ds files on the main thread, so no need for an approximation there I would think. I'm not entirely sure though.
Co-authored-by: saker <sakertooth@gmail.com>
* replace std::pow with better performing equivalents * revert one instance where I swapped to fastPow10f * Negative slope instead of multiplying -1 Co-authored-by: saker <sakertooth@gmail.com> --------- Co-authored-by: saker <sakertooth@gmail.com>
No description provided.