How do I find out why g++ takes a very long time on a particular file?

后端 未结 8 1382
日久生厌
日久生厌 2021-02-01 21:51

I am building a lot of auto-generated code, including one particularly large file (~15K lines), using a mingw32 cross compiler on linux. Most files are extremely quick, but thi

8条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-01 22:27

    What slows g++ down in general are templates. For example Boost loves to use them. This means nice code, great performances but poor compiling speed.

    On the other hand, 15min seems extremely long. After a quick googling, it seems that it is a common problem with mingw

提交回复
热议问题