[Insight-developers] Should default compile mode be Debug, Release or RelWithDebInfo?

Luis Ibanez luis.ibanez at kitware.com
Thu Nov 6 20:20:23 EST 2008


Hi Tom,


A) Just to address the technical side of the question:


    1) Under Windows it is not possible to define from CMake
      the default compilation mode to be used in Visual Studio.

      Therefore, the outcome of this discussion can only be
      a "recommendation" or "advice" to new users.


   2) Under Linux we could force a default compilation mode.
      But again. Linux users for the most part, will know
      how to properly use a compiler, and may not need this
      to be forced upon them.



B) For the philosophical part of the question:

    There are no "slow" algorithms,
    There can only be algorithms that are "slower" than others.

    That is, these claims must be based on comparisons with
    other alternatives, and the comparisons must be clearly
    defined to the point where they can be *replicated*.

    A formal discussion about performance, should include
    timing numbers resulting from profiling programs that
    are available for others to replicate the results.

    The Insight Journal will be an appropriate platform
    for bringing these type of comparisons to the public
    arena.



C) For the recommendation side of things:

    In ITK, you want to build with Release mode, which under
    Linux will use the -O3 flag. Using the -O2 flag is not
    enough for optimizing the execution of C++ templated code.



      Regards,


       Luis


----------------------
Tom Vercauteren wrote:
> Hi all,
> 
> It seems that many new ITK users find ITK slow. Part of this is of
> course based on some truth, but in many cases it ends up by
> "OK, I didn't know I had to compile in Release mode."
> 
> So I am wondering whether it wouldn't be easier if, by default, ITK
> was build in Release mode (or maybe RelWithDebInfo).
> 
> Indeed, I would expect that people that need ITK in debug mode are
> people that know how to use a debugger and hence can manage to find
> the adequate CMake option to switch to Debug.
> 
> On the other hand newbies are less likely to know how to use a
> debugger, won't tweak with CMake options and expect things to run
> fast.
> 
> Any thoughts?
> 
> Tom
> _______________________________________________
> 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