Archived

This topic is now archived and is closed to further replies.

mvc++ disasm optimzation

This topic is 5802 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
is there an option to view it in optimized form, so i dont have to go into some 3rd party editor?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites