Answer architecture round 1: refuse a name read inside the field it binds, check every scope's cycles, build a column read in one pass, drop the implicit struct pick for names across tags, and state the fresh-draw rule once
This commit is contained in:
+1
-2
@@ -159,8 +159,7 @@ func TestNoStructAllocRegression(t *testing.T) {
|
||||
if err := f.FakeStruct(&v); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// The three tags read one pick of x: its frame and memo cost two allocations.
|
||||
const base = 7.0
|
||||
const base = 5.0
|
||||
if allocs := testing.AllocsPerRun(10000, func() { f.FakeStruct(&v) }); allocs > base*1.10 {
|
||||
t.Errorf("FakeStruct: %.1f allocs/op regressed past %.1f (baseline %.1f + 10%%); compiling the type per call is the usual cause", allocs, base*1.10, base)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user