Not that I'm in that situation currently, but I'm just interested in the answer...
Assuming you have some code written in C/C++ and you want to manually optimize it by modifying it in ASM.
What happens if you alter the code in C/C++ and recompile from source. Sure, the optimization on the just compiled file is lost. How do you avoid that these optimizations need to be redone each time the project is compiled? Do you create separate source files for the parts that need to be optimized to make it less complex? Or is there some kind of automatic tool to do this...? Guess you cannot use diff/patch for this...
Please share your experiences, thanks