
26 Aug
2007
26 Aug
'07
8:49 p.m.
Howard Hinnant:
I've been using "sizeof(condition)" as shorthand for "reducing L1 cache misses". Your technique of moving the checking to a static map (or unordered_map)<void*, void*> does indeed reduce the sizeof(condition), but does not reduce L1 cache misses.
map<> is the "debug" variation, there's also a "checked release" one. They do reduce the L1 cache misses on the only path where these misses can be measured, the path that does not call wait. Once you call wait, you enter a blocking kernel call and L1 misses cease to be of importance.