3 ms·
So you put in the parameters into registers 'per hand' in assembly and then memcopyed some function to the right adress (using a function pointer?) to process t
by iammyIP 10y ago
So you put in the parameters into registers 'per hand' in assembly and then memcopyed some function to the right adress (using a function pointer?) to process these registers? Wow. That sounds pretty complicated.
For now i just use gcc and function pointers and let gcc do the rest.
About the 1/(60 * 700) what does that number even mean to you?
1/60 is the usual refresh rate in seconds, about 16 ms, why do you multiply this with 700, this makes no sense?
- vardump 10y agoYou said earlier: > Graphics in a minimum 60 fps context is about 700 times less time sensitive. 16.6 ms (60 fps) / 700 = ~24 microseconds. > So you put in the parameters into registers 'per hand' in assembly and then memcopyed some function to the right adress (using a function pointer?) to process these registers? Wow. That sounds pretty complicated. For now i just use gcc and function pointers and let gcc do the rest. I concatenated blocks of compiled code together (compiled as position independent), avoiding branches and indirect calls. Loop setup block took care of putting right parameters to right registers. Hardest part was getting the filter parameter passing right. Dynamic configuration was trivial after that. There were no function pointers except one to trigger the top level loop.
- iammyIP 10y agoMy original calculation was that in audio you need to deliver 44000 values per second, in graphics you need 60 - 44000/60 roughly equals to 700. That's the difference factor :) (of course the data volume per delivery and it's techniques differ much, thats why i suggested that these are very different problems) It's very simple, maybe we got caught up into some misunderstanding. For your concatenated blocks of precompiled code maybe you should have used simple function pointers, and one monolithic precompiled block to achieve the same result like i originally suggested.
- vardump 10y ago> For your concatenated blocks of precompiled code maybe you should have used simple function pointers, and one monolithic precompiled block to achieve the same result like i originally suggested. That's how the original version was like, but it was way too slow. I achieved eventually about 10x faster performance for typical (dynamic) configurations.