diff options
| author | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | 2016-02-16 13:49:49 +0900 |
|---|---|---|
| committer | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | 2016-02-16 13:56:27 +0900 |
| commit | 1a444a870705b263cb4ee080ddfafde42c0f5563 (patch) | |
| tree | a59ca6fda7318cf4f3a7d843e547df95b6063cf4 /main.cc | |
| parent | 7373ee2bb78ac887d3684ab2d243c3226573b5ee (diff) | |
[C++] Set CPU affinity
Sticking to a single processor improves the performance while
we are running only a single thread.
Diffstat (limited to 'main.cc')
| -rw-r--r-- | main.cc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -21,6 +21,7 @@ #include <time.h> #include <unistd.h> +#include "affinity.h" #include "dep.h" #include "eval.h" #include "exec.h" @@ -133,6 +134,8 @@ static int Run(const vector<Symbol>& targets, ClearGlobCache(); } + SetAffinityForSingleThread(); + MakefileCacheManager* cache_mgr = NewMakefileCacheManager(); Vars* vars = new Vars(); |
