Since I have invested quite some time I would like to share my results with you.
I have used MSVC Version 7.1 and MinGW-w64 with g++ 7.1.0. I have repeated my performance tests with the current Open CASCADE version, the current version of my algorithms and newer compiler versions, because I always want to keep an eye on performance.
If anyone knows how to do that, I would greatly appreciate any hint. I have tried to use link-time optimization with MinGW-w64, but I have failed. Binary files compiled with MinGW-w64 are performing significantly better than those compiled with MSVC. The DLL sizes are comparable, if optimization is set to "-O2" for MinGW-w64, with "-O3" the DLLs from MinGW-w64 are larger. MSVC is doing the compilation job significantly faster than MinGW-w64. Compilation times I have just measured once.Īlgorithm 1 Execution Time on a Flat Surface:Īlgorithm 2 Execution Time on a Flat Surface:Īlgorithm 1 Execution Time on a Curved Surface:Īlgorithm 2 Execution Time on a Curved Surface: Then I have executed the algorithms times for each configuration, measured the execution time with std::chrono and computed the average execution time. I have ensured that the programs are really 64-bit programs by looking at the task manager. Again I have stuck to the default compilation flags ("-O3") for OCCT and our code, but I have also checked the alternative "-O2".Īlgorithm 1: Solve a second order ordinary differential equation of a B-Spline surface (many D2 evaluations).Īlgorithm 2: Compute special curves over a B-Spline surface (projections, intersection computations and D0, D1, D2 evaluations). I have compiled OCCT with CMake and MSys Makefiles. I have used MinGW-w64 4.2.0 (at least this is written in the file build-info.txt) which used g++ 5.2.0 as compiler. Our code I have compiled with the compile flags proposed by qmake (the most important being probably "-O2"). For compiling OCCT I have created NMake make files with CMake and I have stuck to the default compilation flags.
I have compiled 64 bit executables by using "vcvarsall.bat amd64" before project setup and compilation. I have used Visual Studio 2015 which seems to be named also "Microsoft Visual Studio 14.0" and the compiler prints the version number 6.
It uses OpenMP, therefore OpenMP has been activated for both compilers.
Our software source code was the same for both compilers. I have been able to compile OCCT with MinGW-w64, also when the additional libraries FreeImage and Gl2Ps are enabled and I would like to share some of my experiences. Since we do software development both on Windows and on Linux computers, it is useful to use the same compiler on both systems (up to now we have used the Open CASCADE Community Edition to achieve this). I was thrilled to hear that also the official version of Open CASCADE will support MinGW-w64 from version 7.0.0 on.