summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorXy Ziemba <xyziemba@microsoft.com>2015-02-05 19:22:51 -0800
committerXy Ziemba <xyziemba@microsoft.com>2015-02-05 19:22:51 -0800
commit398d7070430a6e2eb1a30ad2ea04cccd914d904d (patch)
treee579061f229ed5abed7a0665438f1eacf00c339a /build.sh
parentfe4bbc88babb3b01418c82540f3c716696e20fd1 (diff)
downloadcoreclr-398d7070430a6e2eb1a30ad2ea04cccd914d904d.tar.gz
coreclr-398d7070430a6e2eb1a30ad2ea04cccd914d904d.tar.bz2
coreclr-398d7070430a6e2eb1a30ad2ea04cccd914d904d.zip
Use N+1 processors instead of N procs on Linux build
N+1 processors appears to perform 2-3% faster than using just N processors. I've done an A/B test both locally and on a cloud VM. Fixes for this and the previous commit were reported by Sedar Dilek <sedar.dilek@gmail.com>. Thanks!
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 7bc792b1a3..61b3cbc66e 100755
--- a/build.sh
+++ b/build.sh
@@ -81,7 +81,7 @@ build_coreclr()
# Get the number of processors available to the scheduler
# Other techniques such as `nproc` only get the number of
# processors available to a single process.
- NumProc=$(getconf _NPROCESSORS_ONLN)
+ NumProc=$(($(getconf _NPROCESSORS_ONLN)+1))
# Build CoreCLR