std.benchmark is in reviewable state
Marco Leise
Marco.Leise at gmx.de
Wed Sep 28 18:29:41 PDT 2011
Am 27.09.2011, 09:08 Uhr, schrieb Robert Jacques <sandford at jhu.edu>:
> On Mon, 26 Sep 2011 13:20:01 -0400, Timon Gehr <timon.gehr at gmx.ch> wrote:
>
>> On 09/26/2011 05:59 PM, Jonathan M Davis wrote:
>>> On Monday, September 26, 2011 11:43:52 Robert Jacques wrote:
>>>> Great, but MS still recommends benchmarking be done on a single core.
>>>> And if
>>>> MS thinks that is how benchmarking should be done, I think that's how
>>>> we
>>>> should do it.
>>>
>>> And how would you ensure that? Beyond having your application be
>>> single-
>>> threaded, I'm not aware of any way to have any control over whether a
>>> particular process is run on a single core or not. Generally, that
>>> stuff is
>>> completely managed by the OS and the hardware and is outside the
>>> control of
>>> the programmer. I'm not saying that there definitively isn't a way to
>>> ensure
>>> that a process only runs on one core, but I'm not aware of one.
>>>
>>> - Jonathan M Davis
>>
>> There are API functions to do that on any reasonable OS.
>>
>
> Such as SetThreadAffinityMask, which I mentioned in my original post.
sched_setaffinity (per process / Linux)
pthread_setaffinity_np (per thread / Posix)
More information about the Digitalmars-d
mailing list