[Insight-developers] PROPOSAL: Change default build type to "Release"

Matthew McCormick (thewtex) matt at mmmccormick.com
Sun Jul 24 10:14:14 EDT 2011


I like a third option -- RelWithDebInfo.

That produces '-g -O2', at least on Linux.

It is nice to have debugging symbols in there for a quick correction
in case something goes wrong.  '-g -O2' is also good for profiling.

-O2 is nicer than -O3 because you still get the optimizations that
have the most impact speed while still keeping compile time
reasonable.  We may also dissuade new users from continuing if it
takes forever to compile.

Matt

On Sat, Jul 23, 2011 at 3:12 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> There is a HUGE performance hit if ITK is built with Debug, especially on
> Windows. It can be 10-30 times slower. I don't think that VTK has as much
> degradation. I think it is because of the iterator loops that can be
> flattened by a smart compiler, and the heavy use of templates.
>
> I think the default should be Release. Developers should be smart enough to
> build with Debug, but the typical user is not smart enough to change to
> Release.
>
>
> On Sat, Jul 23, 2011 at 12:35 PM, Marcus D. Hanwell
> <marcus.hanwell at kitware.com> wrote:
>>
>> Hans,
>>
>> I never really understood what an empty build type meant, and on MSVC
>> there is a default. For Titan, VTK, and others I added a default of
>> Debug to the CMakeLists.txt.
>>
>> On Sat, Jul 23, 2011 at 12:28 PM, Johnson, Hans J
>> <hans-johnson at uiowa.edu> wrote:
>> > ITK developers,
>> > One of the most common reasons for not using ITK is a perception that it
>> > is
>> > really slow.  In my experience of working with newcomers to ITK, I find
>> > that
>> > their first experience (and often their first year of experience) is
>> > with
>> > the most default build of ITK possible.  It is very common that the
>> > first
>> > impressions of ITK are based on whatever is produced by "mkdir –p
>> > ITK-build;
>> > cmake ../ITK; make".
>> > Mostly as a marketing tactic to improve initial impressions of ITK, I'd
>> > suggest that the "mkdir –p ITK-build; cmake ../ITK; make" builds ITK in
>> > "Release" mode.
>>
>> Have you considered using Debug as the default for the development
>> tree, and switching that default to Release when making release
>> tarballs? This is something I have done, and it seems to have been
>> well received (or not noticed). So developers get a default they might
>> expect, and users get one that they might expect.
>>
>> I would also suggest using -O2 with GCC for release rather than the
>> default -O3 from CMake release, but that may well be a different
>> discussion. Just my $0.02 from my experience working on various CMake
>> based projects (largely from the Linux/Mac perspective).
>>
>> Marcus
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
>


More information about the Insight-developers mailing list