On Thu, 23 Jul 2015 16:43:01 +0000, Clayton wrote: > On Wednesday, 22 July 2015 at 09:32:15 UTC, John Colvin wrote: >> On Wednesday, 22 July 2015 at 09:23:36 UTC, Clayton wrote: >>> [...] >> >> The normal way of doing this would be using std.datetime.StopWatch: >> >> StopWatch sw; >> sw.start(); >> algorithm(); >> long exec_ms = sw.peek().msecs; > > Am wondering how possible is to restrict that all algorithms get run on > a specific core( e.g. CPU 0 ) since I wanted my test run on the same > environment.
If you are using Linux, you can use `taskset`. Example: `taskset -c 0 ./program`. This will run your program on the first CPU only.