C ++ optimization issue

I have a medium-length project that actively uses libraries boostand therefore suffers in terms of Debug application performance (Visual Studio 2008).

The solution I'm using right now is to enable the insert function even in debug mode, which brings sufficient performance, but it must have some drawbacks.

Does anyone know what I will lose in terms of debugging capabilities if I force the inlining ( /Ob2) function ?

Maybe someone has other ideas about speeding up formatting / other template libraries? Performance debugging?

+3
source share
4 answers

In my opinion, you probably shouldn't test your version of debugging.

Save the debug version for unit testing so that you can easily find problems, but the actual testing (functionality and performance) should probably be in the release version.

What will your customers work in the end, right?

+8
source

I agree with the previous answers that you still do not need to worry about the performance of your debug assembly as a whole. The tests are there because we need them ...

Nevertheless, I am a pragmatic programmer, and there is a reason why I do not use the valgrinded application to run my tests: I do not want them to be too slow, because at this moment the system becomes completely impractical.

, inline, , , , , .

. , , (, ), . , , . , , gcc, , .

+3

, , , Release ( , ..). - .

Debug , . , .

+1

/Ob2 Debug Release. , , , .

+1

Source: https://habr.com/ru/post/1754602/


All Articles