开发者

Does anyone have experience with gcc's LTO (C++)?

My main interest is with moving code from header files to source files (for decoupling), but keeping the same performance for the inlined stuff.

I'm not sure where to get started, could 开发者_Go百科someone explain what to do?


I did some testing on Firefox and LTO showing memory use, compile times and runtimes At my blog also comparing with LLVM. LTO is quickly developing, GCC 4.9 fares considerably better than previous releases. It is not always obvious how to get it working right for a given application, the text describes the main problems you can encounter (lack of linker plugin, using fat LTO files and throwing away the LTO part at link and others)


We have made very limited experiments. In our case, performance gains where quite neglictible, but as we had already taken care of having good inlining, that's not extremely surprising.

However, enabling LTO incurred a huge increase in GCC's memory consumption, basically making parallel compilation impossible on our 4 CPU / 4 GB developpement machines, so we suspending the experiment and are waiting for future versions to try again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜