PDA

View Full Version : QTL: Debug build faster than release build?



tuli
17th March 2013, 19:42
I am working on some lengthy algorithms, which basically read a file in, process its ocntent, and write the results back to another file.
For a given file x, which is use for testing, the debug build took 6 seconds to completely process the file.
I was happy with this result, compiled it in release mode - and the same code with the same file took 9 seconds.

DId a full recompile of the whole projekt - same.

In the algorithm, i make heavy use of the QTL (specifically QMap, QVector, QMultiMap), and this is the only thing i can think of that might be causing all this through some black magic.

As i said, it's a lengthy pice of code, and i was not able to pin it down to a specific line or area. Though i will continue to try.

Any ideas on this?

IDE: VS2008ProSP1 + qt plugin
Qt: 484
hw: i7 + 8gig ram

wysota
17th March 2013, 20:53
Are you asking about compilation time or execution time?

tuli
17th March 2013, 22:32
Execution time. Poor wording on my part, sorry.

wysota
17th March 2013, 22:59
To suggest an explanation I'd have to see your code with a trustworthy benchmark approach (taking into consideration things such as data cache).

d_stranz
17th March 2013, 23:49
Run the algorithm 2 times and keep track of the time it takes to do each loop through the file. If the data are being cached, the second pass should be faster than the first.

What happens if you run the debug and release versions *outside* of the development environment? (i.e., run them each from the command line).