[Insight-developers] Empty FixedArray destructor: Performancehit using gcc : [ Mac Guru needed ! ]

Tom Vercauteren tom.vercauteren at m4x.org
Thu Jun 12 03:34:37 EDT 2008


Hi,

I think I got the problem. The test that has been committed was
slightly different from the one I proposed.

At the end of the committed test, the code was:
  if( acc1+acc2 == 0.0 )
    {
      return EXIT_SUCCESS; // This is a null operation on purpose.
    }
  return EXIT_SUCCESS;

As you may see here: whatever the result of acc1+acc2 is, we ask to
return EXIT_SUCCESS. Some compilers are smart enough to realize that
they thus don't need to compute acc1 or acc2. As a results the whole
loops could be optimized out. This may have led to irrelevant timing
measures.

I have patched the test and the dashboard looks fine.

Tom

On Tue, Jun 10, 2008 at 9:39 PM, Bradley Lowekamp
<blowekamp at mail.nih.gov> wrote:
> As this just showed up on just the apple "Release" build I think that it's
> just due to different standard "-03" optimizations options on the apple
> versions of gcc (I am not sure if it's changed with gcc 4):
> http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/gcc/Optimize-Options.html
> I also tried a third timed loop on the test, and the performance of the
> later two passes were the same, so I think there is also
> cacheing involved in the perforce difference. But this does not explain it
> all since increasing the number of passes per timed loop produces linear
> increase in the time of the passes.
>
>
> still have a 50% change in performance when moving the base
> pointer of an array of FixedArrays, despite the fact that
> the empty destructor of the FixedArray has been removed.
>
> It does not look like the pointer moves between the two passes since it's 8
> byte aligned to begin with.
>
> I also noticed that a lot of test passed with 0ms for both of the times.
>
>
> On Jun 10, 2008, at 9:21 AM, Luis Ibanez wrote:
>
> Mac Guru Needed !
>
>
> We need help from a Mac Guru to understand why the following
> Mac builds:
>
> http://www.cdash.org/CDash/testSummary.php?project=2&name=itkFixedArrayTest2&date=20080610
>
> still have a 50% change in performance when moving the base
> pointer of an array of FixedArrays, despite the fact that
> the empty destructor of the FixedArray has been removed.
>
>
> Thanks for any help, advice or hint,
>
>
>   Luis
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
>


More information about the Insight-developers mailing list