[Insight-users] Release 2.0.0 slower than 1.6.0 and 1.8.1 -Cygwin1.5.13, GCC 3.3.3-3

Karthik Krishnan Karthik.Krishnan at kitware.com
Fri Mar 4 14:02:06 EST 2005


Hi,

In case it is of help, I've had this problem with quite a few 
applications (such as the OtsuMultipleThresholdsCalculator etc) on the 
cygwin execs running slower than the MSVC execs.

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs
Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr 
--exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/
ib --libexecdir=/usr/lib --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc
pascal --enable-nls --without-included-gettext --enable-libgcj 
--with-system-zlib --enable-interpreter --enable-threads
posix --enable-java-gc=boehm --enable-sjlj-exceptions 
--disable-version-specific-runtime-libs --disable-win32-registry
Thread model: posix
gcc version 3.3.3 (cygwin special)

Thanks
karthik


Stephen R. Aylward wrote:

>is this due to the random number seeding - didn't that add a new step each iteration?
>
>-----Original Message-----
>
>From:  "Miller, James V (Research)" <millerjv at crd.ge.com>
>Subj:  RE: [Insight-users] Release 2.0.0 slower than 1.6.0 and 1.8.1 -Cygwin1.5.13, GCC 3.3.3-3
>Date:  Fri Mar 4, 2005 12:51 pm
>Size:  3K
>To:  "Miller, James V (Research)" <millerjv at crd.ge.com>,   "Frederic Perez" <fredericpcx at gmail.com>, <insight-users at itk.org>
>
>Just finished my cygwin build
>
>Visual Studio .NET 2003 (RelWithDebInfo) -  0.1 seconds
>Cygwin GCC 3.3.1 (Release)               -  2.2 seconds
>
>Certainly looks like there is a considerable efficiency factor wrt
>the Cygwin GCC build.
>
>Jim
>
>
>-----Original Message-----
>From: Miller, James V (Research) 
>Sent: Friday, March 04, 2005 9:53 AM
>To: 'Frederic Perez'; insight-users at itk.org
>Subject: RE: [Insight-users] Release 2.0.0 slower than 1.6.0 and 1.8.1 -
>Cygwin1.5.13, GCC 3.3.3-3
>
>
>Interesting...
>
>I just ran your code on a 512x512 CT image compile RelWithDebInfo using
>Visual Studio .Net 2003 and the execution time was 0.1 seconds on my
>2 year old laptop (in line with your reports on version 1.6 and 1.8).
>
>I don't have a cygwin build on this machine to verify if it is a 
>cywin/gcc issue.
>
>Jim
>
>
>
>-----Original Message-----
>From: insight-users-bounces at itk.org
>[mailto:insight-users-bounces at itk.org]On Behalf Of Frederic Perez
>Sent: Friday, March 04, 2005 8:40 AM
>To: insight-users at itk.org
>Subject: [Insight-users] Release 2.0.0 slower than 1.6.0 and 1.8.1 -
>Cygwin1.5.13, GCC 3.3.3-3
>
>
>Hello Insight-users,
>
>I updated my ITK version from 1.6.0 to 2.0.0 and, to my surprise, some of my 
>applications, when recompiled for the ultimate version, run at a much slower 
>pace. The affected applications use itk::ImageMomentsCalculator and 
>itk::FloodFilledImageFunctionConditionalIterator. It is simply a problem 
>of time---the results (generated images, for example) in all cases matched.
>(Details using a simple test program are given below.)
>
>I wonder if other Insight-users are experiencing the same behavior.
>
>I have used Cygwin 1.5.13 and GCC 3.3.3-3 for all the tests, trying 
>different CMAKE_BUILT_TYPEs but nothing rang a bell.
>I even downloaded and built the intermediate ITK release 1.8.1, for which 
>the tests were succesfull (timings similar to the ones using 1.6.0).
>
>Any hint to solve this problem would be very much appreciated.
>
>Thanks for your consideration,
>
>Frederic Perez
>
>----------------------------------------
>
>A simple testing program follows:
>
>#include "itkImageFileReader.h"
>#include "itkImageMomentsCalculator.h"
>#include "itkTimeProbe.h"
>
>int
>main( int argc, char ** argv )
>{
>  //  Read input image
>  typedef short PixelType;
>  typedef itk::Image< PixelType,  3 > ImageType;
>  typedef itk::ImageFileReader< ImageType  > ReaderType;
>  ReaderType::Pointer reader = ReaderType::New();
>  reader->SetFileName( argv[1] ); // argv[1] holds the input filename
>  reader->Update();
>
>  //  Calculator stuff
>  itk::TimeProbe clock;
>  clock.Start();
>  typedef itk::ImageMomentsCalculator< ImageType > CalculatorType;
>  CalculatorType::Pointer calculator = CalculatorType::New();
>  calculator->SetImage( reader->GetOutput() );
>  std::cout << "Calculator starting to compute..." << std::endl;
>  calculator->Compute(); // This was in a try/catch pair
>  clock.Stop();
>  
>  //  Give result and exit
>  std::cout << "GetTotalMass = " << calculator->GetTotalMass() 
>	    << " [ Time: " << clock.GetMeanTime() << " seconds ]" << std::endl;
>  return 0;
>}
>
>Compiling and linking it to different ITK binaries, we obtain "foo.exe" files.
>The result of their related executions for a certain input file are summarized
>below:
>
>ITK v.  Built-type      Output (just the "Time:")
>------  ----------      -------------------------
>1.6.0   Release         [ Time: 0.672 seconds ]
>1.8.1   Release         [ Time: 0.641 seconds ]
>2.0.0   Release         [ Time: 33.203 seconds ]
>2.0.0   RelWithDebInfo  [ Time: 36.406 seconds ]
>2.0.0   RelMinSize      [ Time: 36.031 seconds ]
>2.0.0   Debug           [ Time: 36.407 seconds ]
>
>Surprisingly enough, the 2.0.0 debug related version lasts the same as the
>optimization related versions!
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>
>--- message truncated ---
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>
>  
>



More information about the Insight-users mailing list