fips icon indicating copy to clipboard operation
fips copied to clipboard

Experiment: optionally merge all impl files of a module into one

Open floooh opened this issue 10 years ago • 2 comments

It's worth a try to generate a single source file per module which includes all .cc files during a cmake run, and only compile this single source file, and check how much this would reduce compilation time. This should be global cmake option. The advantage is that this would not require any changes to existing projects (neither their source file or cmake files), and that this would also automatically handle fips imports (e.g. complex librararies like turbobader, curl, glfw... could probably benefit greatly from this). The disadvantage is that the linker might pull in code which isn't used, so to use this for release builds, further dead code elimination would be necessary (e.g. LTO on clang, and on VStudio, each function should go into its own COMDAT via /Gy (https://msdn.microsoft.com/en-us/library/ms235601.aspx)), for debug builds this doesn't matter at all though.

floooh avatar May 20 '15 06:05 floooh

...this could be useful:

https://github.com/sakra/cotire/blob/master/MANUAL.md

floooh avatar Sep 18 '15 16:09 floooh

Update: a simple test to simply create a source file with all .cc file of a module failed with templates which were instantiated before the specialization code was encountered :/

floooh avatar Oct 13 '15 18:10 floooh