Hi Enrico,
  Here are the results for the Intel Compiler. I ran it on the same
machine as the previous tests, so the HW and the SW platforms are the
same.
                                       Intel C++ Compiler 9.0
No Optimizations             3.3740
/fast [for speed]                0.0000

As before, the minimum value from 5 executions was noted.

 As for your request to double the number of function calls, that
would not make any difference to the optimized code. This is because
both MSVC and Intel compilers detect that the main() code does not
utilize the values returned from calls to myfunction(), and hence
optimize these calls out of the final code (As Jeroen pointed out
initially).
 To illustrate this point, I am attaching the assembly files generated
by MSVC 2003 and the Intel compiler (attachment removed for posting to
the mailing list). The assembly code is commented with the lines
numbers from the actual C source file. You want to pay attention to
the assembly code generated for Line 53,
which contains the actual call to myFunction(). In the  code generated
with no optimizations, you can find the call to this fn in the
assembly source. However, in the assembly generated with speed or size
optimizations enabled, this function call is missing from the assembly
generated for line 53.
Hope this helps.
Regards,
Tanuj

PS - Jeroen, my apologies for misspelling your name in my earlier post. :(



On 10/17/05, Enrico Migliore <[EMAIL PROTECTED]> wrote:
> >Hi Enrico,
> >I have access to the intel compiler (v9 I believe). It's installed on
> >a different machine though. I'll try to run the test code on it and
> >post the results tomorrow. However, I wouldn't expect anything other
> >than the 0 second results we have been getting with MSVC.
> >Regards,
> >Tanuj
> >
> >
> >
> Hi Tanuj,
>
>   try to double the number of function calls and, at the end of the
> test, divide the time
>   elapsed by two.
>   Thanks of for your time.
>
> regards,
>  Enrico
>
>

Reply via email to