-
Notifications
You must be signed in to change notification settings - Fork 42
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
pow() vs powf() #168
Comments
scratch this comment as redundant of the above. Do we gain anything from using pow?
|
pow() is ansi, powf() is c99. My question remains, i.e.
For x86, it shouldn't be. |
You mean standard C or ANSI C? By default, Microsoft's Visual Studio C Compiler doesn't follow the ANSI C standard. |
I meant C89, i.e. available practically in every and all libc |
Good. :) As you mentioned for x86 that there shouldn't be any overhead, how about our armhf friends (nintendo3dsdevkit and raspberry pi) ? |
Not just arm, but ppc and any others. (Hope that anyone's listening.) |
I will have a look
…Sent from my iPhone
On 15 Feb 2017, at 10:05 pm, sezero ***@***.***> wrote:
Do we gain anything from using pow?
pow() is ansi, powf() is c99. My question remains, i.e.
what do we gain anything from using powf()?
Is it more CPU intensive than powf?
For x86, it shouldn't be.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Had any chance to look? |
Oops, sorry guys.
I've got to finish a research assessment *low grumbling about large word counts* and I will look at this when I get back from town today.
Chris
…Sent from my iPhone
On 1 Mar 2017, at 7:24 am, sezero ***@***.***> wrote:
I will have a look
Had any chance to look?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
PING ? |
@chrisisonwildcode any ideas on this? |
I guess this question will go unanswered for quite a long time... |
I have an idea what is going on. 0.4 reworked a lot of the code. There is a flaw in tracking timing changes in the initial read of the midi file. A simular flaw occurs also in devtest.c
…Sent from my iPhone
On 26 Jul 2017, at 5:38 pm, Bret Curtis ***@***.***> wrote:
@chrisisonwildcode any ideas on this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hmmm.. :) |
I believe your comment was intended for bug #176, yes? |
Something interesting, using pow(x, 3) is more cpu intensive than just x * x * x, apparently even modern gcc and clang behave the same for float (powf). We could move to double (pow) and use --fast-math, which give us a speed boost (no overhead compared to x * x * x). https://baptiste-wicht.com/posts/2017/09/cpp11-performance-tip-when-to-use-std-pow.html
|
hmmm, I can't see why we couldn't use pow() in there. … can we get -ffast-math happening? |
In internal_midi.c:_WM_AdjustNoteVolumes() we use powf() and floats instead
of plain old pow(). Is there a specific reason? Is the extra precision harmful?
The text was updated successfully, but these errors were encountered: