GNU make: should the number of jobs equal the number of CPU cores in a system?

后端 未结 10 1079
长情又很酷
长情又很酷 2020-12-07 10:13

There seems to be some controversy on whether the number of jobs in GNU make is supposed to be equal to the number of cores, or if you can optimize the build time by adding

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-07 10:55

    Just as a ref:

    From Spawning Multiple Build Jobs section in LKD:

    where n is the number of jobs to spawn. Usual practice is to spawn one or two jobs per processor. For example, on a dual processor machine, one might do

    $ make j4

提交回复
热议问题