Speed up MySQL 5.4 compile time on a (8 core) Mac Pro
May 8, 2009For the longest time I have been trying to figure out how to force GCC to use multiple cores when doing compiles. Today, I finally came across the -j flag for make. This basically tells make to run x number of jobs at a time. Warning, don’t specify -j without a parameter or it will spawn an infinite number of jobs which is very bad.
| Make command | Compile time |
| make | 8min 1sec |
| make -j 2 | 4min 42sec |
| make -j 4 | 3min 9sec |
| make -j 6 | 2min 46sec |
| make -j 8 | 2min 37sec |
| make -j 10 | 2min 43sec |
| make -j 12 | 2min 38sec |





