On which stage (lexical analysis, syntax analysys, and so on) is most of the compilation time spent? I know that during compilation we need to undergo several stages like lexical analysis, syntax analysis and so on. Which of them takes the most time?
For a few compilers I've seen compilation times was reduced 3+ fold when optimization was disabled, so otherwise they spent most time on optimization passes.