News for hackers. Stuff that matters.
Re:Adding Modules to C in 10 Lines of Code [pdf] by formerly_proven on Monday June 27, 2022 @06:10AM (#31892558)
For smaller C++ projects this tends to be way faster than the conventional wisdom of having many CUs, mostly because all the library bloat will only be parsed and instantiated once.
Re:Adding Modules to C in 10 Lines of Code [pdf] by kringerkat on Monday June 27, 2022 @08:37AM (#31893693)
Also reduces link time.

I find that projects up to around 50K lines compiles instantly as a single file/"unity build" and is my preferred way for most of my projects.

Re:Adding Modules to C in 10 Lines of Code [pdf] by arinlen on Tuesday June 28, 2022 @01:23AM (#31904390)
> Also reduces link time.

It's important to stress that it does more than reduce link time: unity builds completely eliminate linking when plugging together submodules, and the final project linking simply has far fewer object files to link.

Re:Adding Modules to C in 10 Lines of Code [pdf] by Asooka on Monday June 27, 2022 @01:09PM (#31897512)
This really should be solved at the compiler level, rather than forcing people to restructure their projects.