views:

80

answers:

2

Can we see optimized code in c++.............(not assembly)??

+3  A: 

No.

'Optimization' is something a compiler does to the intermediate representation and assembly, not to the source code.

Will
+3  A: 

Optimised code rarely translates back to the language it came from cleanly, with the optimisations intact, since optimisations will usually happen at the assembly level. Either that, or the 'optimisations' are entirely artificial at the C++ (or other language) level - the difference between implementing an if statement with one instruction rather than another for example.

Matthew Scharley