5 ms·
Generally, people on Linux will be compiling using Makefiles, so just use make -j<num cores> to speed it up.
by pinoyboy82 15y ago
Generally, people on Linux will be compiling using Makefiles, so just use make -j<num cores> to speed it up.
- burgerbrain 15y agoUsing -j with C++ builds will always still be significantly slower than using -j with C builds. Also, I believe the rule of thumb for the -j argument tends to be 2 times your number of cores. A surprising amount of build time is often spent on disk I/O, so you see worthwhile gains for quite a while running more jobs than cores.
- dfox 15y agoGNU make also has -l (load limit) and make -j -l <number-of-cores> seems like better idea and in my experience works better. But still I tend to just run make -j without any limit which on modern systems works well enough.