Closed SergeAx closed 7 years ago
That is an excellent suggestion @SergeAx!
I'm now reading on the performance of -j
and it appears that setting it to 2
provides the best improvement.
How about we check for 2 or more cores and then set it to -j2
instead of the actual core count?
I've read answers on StackOverflow from your link and it seems to me that all authors agree with my point: make
performance increases linearly until number of jobs equals to number of cores.
While exploring ARM architecture I see it's strength in large numbers of cheap slow cores, so using all of them is a key to squeeze maximum performance. Memory can be an issue on systems with 16+ cores, but I believe those systems should be well equipped with RAM too.
So I would stand with my initial suggestion of using cat /proc/cpuinfo
, but the final decision is certainly up to you as an author of original package.
Thanks @SergeAx!
@SergeAx You were right -- this provides a huge performance boost! Here is a screenshot of the build on Orange Pi Zero:
It is a real pain to compile on ARM-machine knowing there are 3 more cores available :)