I can examine the optimization using profiler, size of the executable file and time to take for the execution.
I can get the result of the optimization.
But I have these questions,
- How to get the optimized C code.
- Which algorithm or method used by C to optimize a code.
Thanks in advance.
you can get an idea of optimization using the option
-fdump-tree-optimizedwith gcc .and you’ll get an optimised file. you cannot run the code but using that you can get an idea of optimization . dont forget to include
-O2or-O3or some other level.