Hacker News new | ask | show | jobs
by pinoyboy82 5513 days ago
Generally, people on Linux will be compiling using Makefiles, so just use make -j<num cores> to speed it up.
1 comments

Using -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.

GNU 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.