mvc++ disasm optimzation

Started by
3 comments, last by EvilCrap 22 years, 1 month ago
in debug, has the mvc++ disasm been optimized? ive been trying to compare c++ vs c++ on compilation into asm, but, ive noticed that many things i do, that should/could have been optimized, werent. BUT THEN, i ran trials, and didnt notice any differences, even though the asm differed. so again, has the debug disasm optimized?
Advertisement
No; that''s the point of having a separate debug build. It doesn''t do any optimisation so that the generated code is easier to follow and better reflects the code you entered.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]
is there an option to view it in optimized form, so i dont have to go into some 3rd party editor?
In release mode, add the /A option to the compiler arguments, it will generate a .asm for each .cpp it compiled.

There are also some cool options, check the compiler options in the doc.
quote:Original post by EvilCrap
is there an option to view it in optimized form, so i dont have to go into some 3rd party editor?



All you have to do is turn on debug info in VC++ for your release build (BOTH C/C++ tab and Link tab in Settings). Then recompile.

Now place breakpoints in your release code, and press F5 to start debugging. When it hits the breakpoint, look as the dissasembly. Note that it might seem quite jumbled up, with missing parameters, non-functional breakpoints, etc, because the compiler optimized the code, but you should be able to figure it out.

Just remember to disable debug info in your release build when you''re done.

SS
SS

This topic is closed to new replies.

Advertisement