Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

My debug build is 4 times faster than the release build.

nyryder
Beginner
595 Views
I am developing an encoder that has too many tight loops and mathematical operations. I am using intel compiler 11.0 and IPP for memory allocation and for memory copying. I dont use any optimization in the release, But the release build is 4 times slower in execution than the debug build. I am linking the IPP libraries as static with dispatching.
0 Kudos
3 Replies
Om_S_Intel
Employee
595 Views
Quoting - nyryder
I am developing an encoder that has too many tight loops and mathematical operations. I am using intel compiler 11.0 and IPP for memory allocation and for memory copying. I dont use any optimization in the release, But the release build is 4 times slower in execution than the debug build. I am linking the IPP libraries as static with dispatching.

This is unusual. Could you share details to construct some sort of test case to try out?


Om
0 Kudos
pvonkaenel
New Contributor III
595 Views
Quoting - nyryder
I am developing an encoder that has too many tight loops and mathematical operations. I am using intel compiler 11.0 and IPP for memory allocation and for memory copying. I dont use any optimization in the release, But the release build is 4 times slower in execution than the debug build. I am linking the IPP libraries as static with dispatching.

Wow that does sound strange. You mentioned that you have no optimizations enabled in the release build, so basically the debug and release builds are the same except that the debug build adds symbol generation? Could you list the actual compiler flags you're using for both builds?

Peter
0 Kudos
nyryder
Beginner
595 Views
Quoting - pvonkaenel

Wow that does sound strange. You mentioned that you have no optimizations enabled in the release build, so basically the debug and release builds are the same except that the debug build adds symbol generation? Could you list the actual compiler flags you're using for both builds?

Peter
If i enable the Basic Runtime Checks as Both(/RTC1, equiv.to ?RTCsu) in the Release build, i get the same performance as Debug build. But if i disable this Basic Runtime Checks in the release build, it makes release build execution as 6 time slower than the debug build.
The following options are the command line arguments for the compiler for error case(release build execution time is 6 times slower than the debug build)
Release
/c /Od /Ot /Qip /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /EHsc /MD /GS /fp:precise /Fo"Release/" /W3 /nologo /Wp64 /Qfp-speculationoff /Qparallel /arch:SSE3
Debug
/c /Od /Ot /Qip /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /EHsc /RTC1 /MDd /GS /fp:precise /Fo"Debug/" /W3 /nologo /Wp64 /ZI /Qfp-speculationoff /Qparallel /arch:SSE3


I used ippGetCpuClocks() to measure the time elapsed by the encoder.
In the error case
The release build takes 3375043462 ticks (920 ms)
and the debug build takes 632293616 ticks. (169ms)
The relase build is almost 6 times slower than the Debug build.

0 Kudos
Reply