Compile *nix programs faster multi-core Macs

May 25, '07 07:30:03AM

Contributed by: Anonymous

If you have a multicore processor in your Mac, then instead of doing the traditional compile and install steps for a *nix program...

$ ./configure
$ make
$ make install
...use this version instead:
$ ./configure
$ make -j n
$ make install
The n in the second line is the number of jobs you want make to start. So to reduce compile time, replace n with the total number of cores in your Mac.

[robg adds: At some point, I'd like to test this with a large compile, but I haven't had the time as of yet. If you've done any testing on compile time reductions versus cores used, please post your results in the comments. I think this should work on multi-core G5s and all the Intel Macs...]

Comments (20)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070524074057479