File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 39
39
buildh2.bat
40
40
gen_version.bat
41
41
mkdocs_serve.sh
42
+ experimental /a.out
Original file line number Diff line number Diff line change 11
11
12
12
// *****************************************************************
13
13
// Enable/disable debug instrumentation and statistics printing here
14
- constexpr auto debug_instrumentation = false ;
14
+ constexpr auto debug_instrumentation = true ;
15
15
// *****************************************************************
16
16
17
17
@@ -197,10 +197,12 @@ class extrinsic_storage {
197
197
) noexcept
198
198
-> Value*
199
199
{
200
- auto hash = (((std::size_t )pobj)>>2 ) % Buckets;
201
- // in my experiments, this has smoother utilization (only
202
- // 6.6x difference between the most vs least popular bucket)
203
- // than std::hash<void*>{}(pobj) % Buckets (22x difference)
200
+ // auto hash = std::hash<void*>{}(pobj) % Buckets; // A
201
+ auto hash = (((std::size_t )pobj)>>2 ) % Buckets; // B
202
+ // across the three major C++ implementations I tried, hash B has
203
+ // smoother utilization (2% to 5% difference between the most vs
204
+ // least popular bucket) than hash A (3.5% to 16% difference)
205
+
204
206
assert ( 0 <= hash && hash < Buckets );
205
207
if constexpr (debug_instrumentation) {
206
208
// m_o_relaxed is enough, inc order doesn't matter for totals
You can’t perform that action at this time.
0 commit comments