Some C/C++/Objective-C news for those who are - TopicsExpress



          

Some C/C++/Objective-C news for those who are interested... Facebook has just released a new super fast C pre-processor, written in D, that speeds up GCC C++ compilations. The C pre-processor they found was one of the major bottlenecks for C++ compiles with the GCC toolchain (a series of standalone tools that pipe their output to the next stage in the tool chain). A little research shows that LLVM/Clang is taking an alternative approach. Firstly, the C pre-processor in LLVM/Clang is not a standalone tool as it is with GCC, rather it is an internal stage within Clang that exposes a library interface to the compiler. Everything is done in a single process (less forks). Secondly, the LLVM/Clang team is working on an alternative approach of making the C pre-processor go away for specific use cases such as includes and include guards (the number one bottleneck), with the development of C/C++/Objective-C modules. Modules will likely put C/C++/Objective-C compilation technique in line with other modern compiled languages such as D, Go which use binary modules to increase compilation speed. The compiler will then be able to import pre-compiled binary signatures for each modules exported variables, functions, classes, and short circuit the lengthy header parse stage. Headers, includes, and pre-processor include guards will finally be able to go away so we can have fast C++ compiles. Who said you can’t teach an old dog new tricks… :-D clang.llvm.org/docs/Modules.html llvm.org/devmtg/2012-11/Gregor-Modules.pdf isocpp.org/blog/2012/11/modules-update-on-work-in-progress-doug-gregor
Posted on: Wed, 02 Apr 2014 01:51:56 +0000

Trending Topics



Recently Viewed Topics




© 2015