On 9 jul, 15:16, "gautamcoo...@g mail.com" <gautamcoo...@g mail.com>
wrote:
[...]
[...]
The compiler does not "execute" nothing. But I understand what you
mean. The compiler only optimizes what it can see at compile time,
nothing more, nothing less. You can separate your target function and
the loop in two distinct modules, so you will be pretty sure the
compiler will not fold the loop.
Cheers,
Dijkstra.
wrote:
I want to measure the execution time of a function, which is in the
I have some doubts about this approach -
With full compiler optimizations, I am not sure if the compiler is
making use of the facts that
With full compiler optimizations, I am not sure if the compiler is
making use of the facts that
So the compiler might be executing the function partially or in a
different manner. I do not want that, as it will obviously give a
misleading results.
different manner. I do not want that, as it will obviously give a
misleading results.
mean. The compiler only optimizes what it can see at compile time,
nothing more, nothing less. You can separate your target function and
the loop in two distinct modules, so you will be pretty sure the
compiler will not fold the loop.
Cheers,
Dijkstra.
Comment