Closed
Description
The race-enabled compiler (go install -race cmd/compile
) spends 40% of its CPU time in __tsan MemoryRangeSet. Looking at the implementation of MemoryRangeSet in tsan_rtl.cc, I see (roughly):
if (kGoMode || size < 64*1024) {
// Go pointer by pointer.
} else {
// Do a bulk clear.
}
The compiler does lots of large, bulk memory clears. I wonder whether the kGoMode ||
part of the conditional could be removed.
cc @dvyukov