MegaHurtz ·
Joho.. Ive been playing around with some power functions to get a cpu friendly stream power. So I optimised the stream power from the toolbox.
Be shure to Grab the complete file below 🙂
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
MegaHurtz ·
Joho.. Ive been playing around with some power functions to get a cpu friendly stream power. So I optimised the stream power from the toolbox.
Be shure to Grab the complete file below 🙂
MegaHurtz ·
So I built another 🙂 This one is slightly harder to use becouse it`s finite. But i got inspired by the microtune stuff. And since I happen to prefer 2^x. I like this one better.
trogluddite ·
Many Thanks MHz 🙂 - those have gone straight into my toolbox, good work - interesting to look inside too, so much easier to learn this maths stuff when I can see how it's been done.
MegaHurtz ·
I managed to optimise the 2 pow some more.. it`s max is now 65536. And all the movement outside the sweetspot gets voided. Edit: Fixed a bug where it would output 0 at 0 on recompile, output is now 1.
aliasant ·
How the???
I checked the original Shifrin code and that used about 1038cycles with a fixed base but 8 x 1038 if I fed the base with a stream.
Your optimized version used 15 !!!!! cycles with stream and 16.5cyces with a fixed base.
You went from a gazillion to 15 cycles?
Is there something wrong on my side or is this for real?
The output is also identical as far as I can see.
MegaHurtz ·
it`s more selective about when it works.. if you happen to modulate it for every sample over the whole synths life it`s 2-8 cycles larger. If not it`s hardly working. so statisticly it`s reduced by 49% ish.
aliasant ·
MegaHurtz wrote: it`s more selective about when it works.. if you happen to modulate it for every sample over the whole synths life it`s 2-8 cycles larger. If not it`s hardly working. so statisticly it`s reduced by 49% ish.
I noticed that change but that it can go from over 8000 cycles to 15 is amazing. Incredible really.
Its no understatement if I say NICE F349in WORK !
🙂
MegaHurtz ·
Glad you like it 🙂
bootsy ·
Alien technology? 🙂
MegaHurtz ·
Had a litlle oversight on the stream power module. A real bug when using poly! Turns out changing it reduced the idle to 0. 😉
So.. Assuming everything is in order now, the complete file.
aliasant ·
MegaHurtz wrote: Had a litlle oversight on the stream power module. A real bug when using poly! Turns out changing it reduced the idle to 0. 😉
So.. Assuming everything is in order now, the complete file.
Ooops 🙂 Is it still as fast? Sorry. No time to test right now. 🙁
MegaHurtz ·
it`s faster 🙂 It now deals with redundant sse chanels aswell.
aliasant ·
MegaHurtz wrote: it`s faster 🙂 It now deals with redundant sse chanels aswell.
HOLY COW.
You go girl!
trogluddite ·
Is is Xmas already? Thanks - you really are spoiling us! 😍
infuzion ·
I saved ONE more cycle!! & maybe a few more on an older CPU like Athlon64.
Thank you very much MegaHurtz for doing 99% of the hard work! Since it is almost Easter, I included skinned versions of a further reduced Stereo & Mono versions as a gift.
Happy Easter!
MegaHurtz ·
Glad you like it 🙂
On a sidenote.. poly or mono conversions are mono, quad or poly otimised by default. since the zero flag remains set when an sse chanel is not used.
Edit: LOL Yea.. What was he thinking.
movaps xmm0,bas; movaps fBas,xmm0;
DigitalWhiteByte ·
Many thanks, really an incredible optimization 😀
infuzion ·
MegaHurtz wrote: On a sidenote.. poly or mono conversions are mono, quad or poly otimised by default. since the zero flag remains set when an sse chanel is not used.
I have no idea what you mean here, could you restate please? The CPU Analyzer seems to have a reduction in my Stereo & Mono versions.
MegaHurtz wrote: Edit: LOL Yea.. What was he thinking. movaps xmm0,bas; movaps fBas,xmm0;
[/quote]That's how SM does things also.
infuzion ·
MegaHurtz wrote: On a sidenote.. poly or mono conversions are mono, quad or poly otimised by default. since the zero flag remains set when an sse chanel is not used.
I have no idea what you mean here, could you restate please? The CPU Analyzer seems to have a reduction in my Stereo & Mono versions.
MegaHurtz wrote: Edit: LOL Yea.. What was he thinking. movaps xmm0,bas; movaps fBas,xmm0;
That's how SM does things also. edit: I also for a few years assumed the above had to be done that way until I tried to work around it.
MegaHurtz ·
@ infuzion if you happen to have a calculation that`s occuring on sse1, it wont process sse 2,3 and 4. (for the hard part) maybe a pack unpack is needed for this, but hypotheticly these get processed independantly.
infuzion ·
MegaHurtz wrote: @ infuzion if you happen to have a calculation that`s occurring on sse1, it wont process sse 2,3 and 4. (for the hard part) maybe a pack unpack is needed for this, but hypothetically these get processed independently.
I still do not understand. Are you referring to the 4 single-precision channels? I think I understand how your optimization works now; the actual x86ASM is skipped if the last input value is the same as the current input value. However, cutting out the extra SSE channels will always be slightly faster if you only need stereo or mono, since you don't need to even check if you need to skip those unused channels. Often effects are stereo only.
MegaHurtz ·
it would save two lines, i guess.
bootsy ·
so, does this version properly works on 4 packed streams? Or are there restrictions?
MegaHurtz ·
None what so ever. To my beleive with four sepperate sse chanels poly works as planned aswell. And, it is self-optimising for the chanels with no data.
infuzion ·
bootsy wrote: so, does this version properly works on 4 packed streams? Or are there restrictions?
MHz & I were talking about my release has 2 bonus versions where I took the 4 packed stream version & tore out 2-3 streams for Stereo-only & Mono-only for those specialty cases that use those (like many effects).
Wrote something here? To have a post removed or your name hidden, write to [email protected].