01.05.2011, 08:26
I was looking at a callback and wondering if it being so long would be effecting performance, particularly in cases where the callback is called frequently. The best way I can get my question understood is to create an example.
Will the processor skip instantly over irrelevant bracketed code?

Would ( in theory ) the example on the right cause the callback to be processed any faster?
or would the compiler see these as the same?
The reason I am wondering is because if the processor is taking time to regularly skip over large sections of code that are rarely used, then it would be worth moving that large rarely used code.
Will the processor skip instantly over irrelevant bracketed code?

Would ( in theory ) the example on the right cause the callback to be processed any faster?
or would the compiler see these as the same?
The reason I am wondering is because if the processor is taking time to regularly skip over large sections of code that are rarely used, then it would be worth moving that large rarely used code.