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 3939buildh2.bat
4040gen_version.bat
4141mkdocs_serve.sh
42+ experimental /a.out
Original file line number Diff line number Diff line change 1111
1212// *****************************************************************
1313// Enable/disable debug instrumentation and statistics printing here
14- constexpr auto debug_instrumentation = false ;
14+ constexpr auto debug_instrumentation = true ;
1515// *****************************************************************
1616
1717
@@ -197,10 +197,12 @@ class extrinsic_storage {
197197 ) noexcept
198198 -> Value*
199199 {
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+
204206 assert ( 0 <= hash && hash < Buckets );
205207 if constexpr (debug_instrumentation) {
206208 // m_o_relaxed is enough, inc order doesn't matter for totals
You can’t perform that action at this time.
0 commit comments