[Insight-developers] Empty FixedArray destructor: Performance hit using gcc (times 2) : __attribute__ ((aligned (8)))

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Jun 6 10:52:41 EDT 2008


My guess as to why the empty destructor effects alignment has to do  
with the way the compiler handles trivial verses non-trivial  
destructors. I think removing the destructor just to effect alignment  
and performance is akin to swapping the order of lines of code to get  
better performance. Line swapping can make a surprising difference,  
but it's also waisted effort because it will break on a different  
version of the compiler. I vote for the compiler macros.


On Jun 6, 2008, at 10:23 AM, Tom Vercauteren wrote:

> Hi Luis,
> Well I would really vote for removing the empty destructor
> implementation. This seems to be the cleanest way to solve the
> problem. The empty destructor is useless and only interferes here. I
> don't really like changing compilation flags or adding macros and
> adding a new derived class would be confusing for the user.
>
> Tom
>


Bradley Lowekamp
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20080606/6e6b74ff/attachment-0001.htm>


More information about the Insight-developers mailing list