Skip to content

Commit c5c162c

Browse files
committed
drop binding benchmarks to a single core
This was added for to mainain clock and cpu-cache coherence when moving between cores. However on linux this means that spawning threads from a benchmark will inherit the afinity from the spawner and will themselves be pinned on this core. On the other hand modern hardware has gotten really good with clocks and the clock coherence is mostly a non-issue for cpus made after 2019. So, instead of being this aggressive, we drop this completely. Users must decide wether they want this and do in in their own code.
1 parent c564754 commit c5c162c

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

include/picobench/picobench.hpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// picobench v2.8.0
1+
// picobench v2.9.0
22
// https://github.com/iboB/picobench
33
//
44
// A micro microbenchmarking library in a single header file
@@ -30,6 +30,7 @@
3030
//
3131
// VERSION HISTORY
3232
//
33+
// 2.9.0 (2026-04-30) * Completely drop binding benchmarks to a single core
3334
// 2.8.0 (2025-12-15) Switch to SemVer to appease certain package managers
3435
//
3536
// 2.08 (2025-04-04) Internal. This file was not affected
@@ -131,8 +132,8 @@
131132
# include <functional>
132133
#endif
133134

134-
#define PICOBENCH_VERSION 2.8.0
135-
#define PICOBENCH_VERSION_STR "2.8.0"
135+
#define PICOBENCH_VERSION 2.9.0
136+
#define PICOBENCH_VERSION_STR "2.9.0"
136137

137138
#if defined(PICOBENCH_DEBUG)
138139
# include <cassert>
@@ -378,14 +379,6 @@ class global_registry
378379
#if defined(_WIN32)
379380
# define WIN32_LEAN_AND_MEAN
380381
# include <Windows.h>
381-
#else
382-
# if !defined(PICOBENCH_DONT_BIND_TO_ONE_CORE)
383-
# if defined(__APPLE__)
384-
# include <mach/mach.h>
385-
# else
386-
# include <sched.h>
387-
# endif
388-
# endif
389382
#endif
390383

391384
namespace PICOBENCH_NAMESPACE

0 commit comments

Comments
 (0)