diff --git a/src/runtime/mgcmark.go b/src/runtime/mgcmark.go index 45ccc806bdf..cb73caf3bb7 100644 --- a/src/runtime/mgcmark.go +++ b/src/runtime/mgcmark.go @@ -1257,12 +1257,7 @@ func scanobject(b uintptr, gcw *gcWork) { } var i uintptr - for i = 0; i < n; i += sys.PtrSize { - // Find bits for this word. - if i != 0 { - // Avoid needless hbits.next() on last iteration. - hbits = hbits.next() - } + for i = 0; i < n; i, hbits = i+sys.PtrSize, hbits.next() { // Load bits once. See CL 22712 and issue 16973 for discussion. bits := hbits.bits() if bits&bitScan == 0 {