Optimization is a crucial step in the development context of algorithms, where depending on the purpose, different levels of optimization can be applied. Thus, the Network Dijkstra algorithm has been choosen in order to perform the compilation and execution with some levels of optimization from the GCC, measuring its execution time, number of cycles and instructions. In the present work, it is also discussed how the front-end and middle-end analyzes are performed in GCC.