Moderators: Sascha Willems, walaber
Julio Jerez wrote:OverHetz you are getting too far ahead of yourself. What still do not even have the final update.
one thing I am still not clear, is how it is that a simple callback is producing that much a of a difference in performance.
200 fps seem too execive to me.
Overhertz wrote:Julio Jerez wrote:OverHetz you are getting too far ahead of yourself. What still do not even have the final update.
one thing I am still not clear, is how it is that a simple callback is producing that much a of a difference in performance.
200 fps seem too execive to me.
think about it like this. 60 fps - 60 callbacks which then call another function that is 2 calls, so 1 obj - 120 calls, also push and pop operations, now 1000 cubes, thats 120 x 1000 = 120000, removing 1 call halves this, 120000 / 2 = 60000 (not to mesion the call to SetForce inside newton are inline macros, they are optimised and do not use call at all, so thereforce really by getting rid of the callback, the call operations are removed 100%), not only but reducing more than just call, but several push and pop also, if this was called directly in c++ with linked lib, the compiler would optimise the calls by using registers and jmp, but from an external application it will uses push and call. now get some CPU documentation from intel website and check how many cycles each operation take, then disassemble a compiled application both with and without the call and check the difference in operations. note the application for testing must not directly link the newton lib file and use only the c interface.
Overhertz wrote:i think you better go review that > http://en.wikipedia.org/wiki/Pipeline_(computing)
Overhertz wrote:you are absolutly missing the point, and adding extra functionality to remove useless callbacks is not "prone to errors" that is rubbish, unless the programmer is a complete idiot,
also note i did not mension more instructions but how long instructions take to complete.
proc1 {
push ebp
mov ebp, esp
add esp, FFFFFFFCh
mov eax, [ebp+08h]
inc eax
mov esp, ebp
pop ebp
ret
}
proc2 {
inc eax
ret
}
caller {
//type 1 external
push 5
call proc1
//eax is result
//type 2 internal
mov eax, 5
jmp proc2
//eax is result
}
Julio Jerez wrote:I will add the const force because it is a good idea for interface.
basically instead for initalizing the next acceleration to zero is initalize it to a const value.
Users browsing this forum: No registered users and 2 guests