Automatically speed up compiling of source code on LinuxWhen you compile a program on Linux, the process usually goes
The most time consuming process is usually the 'make' stage where the source code is compiled. Most computers today have CPUs with multiple cores, but by default 'make' only starts one thread and only one CPU core gets to do all work. If you have a dual-core CPU and start 'make' with parameter -j2, compilation is almost twice as fast.
To automatically use all available cores of your CPU, add this into your .bashrc:
This will automatically detect the number of CPUs/cores you have and will start enough threads to keep them all busy next time you type 'make' and you will have to wait much less.
Last updated: 30. Jun 2010|
Page maintained by Jan Willamowius
Imprint/Impressum · Privacy/Datenschutz
Deutsch: Home | Badminton | ISBN-Suche | Musik-Suche | Rezepte | Jan Willamowius