Home › In CPU profiling, FALSE SHARING (cache-line ping…
In CPU profiling, FALSE SHARING (cache-line ping-pong) between threads is best fixed by which?
AUse thread-local storage for every variable always
BPad / align hot per-thread fields to separate cache lines
CPin all threads to the same CPU core (zero migration)
DSwitch to a single-threaded execution model entirely
Answer & Solution
Correct answer: B. Pad / align hot per-thread fields to separate cache lines
Intel Optimization Manual: two threads writing variables on the same cache line (typically 64 B) force coherence traffic. Pad to separate lines for hot counters.
Related questions
In rendering optimisation, BATCHING multiple draw calls into one is most effective when obIn rendering optimisation, FRUSTUM CULLING and OCCLUSION CULLING both skip work; the latteIn texture sampling, MIPMAPS reduce which artifact and at what storage cost?In modern GPU rendering, EARLY-Z (or 'Hi-Z') optimisation rejects fragments before which sIn GPU profiling, 'OVERDRAW' refers to which phenomenon?Per Unity Profiler docs, the Profiler's 'GC ALLOC' counter measures which?In game engine optimisation, an ECS (Entity Component System) typically organises componenPer NVIDIA Nsight + Unity Profiler, a DRAW CALL is expensive primarily because of which co