[go] runtime/maps: only grow small full maps when inserting new keys

5 views
Skip to first unread message

Gerrit Bot (Gerrit)

unread,
Apr 24, 2026, 1:32:09 AM (5 days ago) Apr 24
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot has uploaded the change for review

Commit message

runtime/maps: only grow small full maps when inserting new keys

For small full maps, the existing implementation triggers the growth logic
unconditionally, regardless of whether the key already exists.

This change fixes this issue by only triggering growth when inserting a new
key, not when updating an existing key.

Fixes #78853
Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
GitHub-Last-Rev: e3e076a24010ebd71ab18f4822812d66f14590d8
GitHub-Pull-Request: golang/go#78929

Change diff

diff --git a/src/internal/runtime/maps/map.go b/src/internal/runtime/maps/map.go
index 515558a9..c61fc99 100644
--- a/src/internal/runtime/maps/map.go
+++ b/src/internal/runtime/maps/map.go
@@ -499,9 +499,9 @@
}

if m.dirLen == 0 {
- if m.used < abi.MapGroupSlots {
- elem := m.putSlotSmall(typ, hash, key)
-
+ elem := m.putSlotSmall(typ, hash, key)
+ if elem != nil {
+ // Found an existing slot.
if m.writing == 0 {
fatal("concurrent map writes")
}
@@ -511,9 +511,6 @@
}

// Can't fit another entry, grow to full size map.
- //
- // TODO(prattmic): If this is an update to an existing key then
- // we actually don't need to grow.
m.growToTable(typ)
}

@@ -568,7 +565,7 @@
// more efficient than matchEmpty.
match = g.ctrls().matchEmptyOrDeleted()
if match == 0 {
- fatal("small map with no empty slot (concurrent map writes?)")
+ // No empty slot found. Need to grow the map.
return nil
}

diff --git a/src/internal/runtime/maps/map_test.go b/src/internal/runtime/maps/map_test.go
index c8ef25a..2e52e1c 100644
--- a/src/internal/runtime/maps/map_test.go
+++ b/src/internal/runtime/maps/map_test.go
@@ -57,6 +57,56 @@
}
}

+func TestSmallMapGrow(t *testing.T) {
+ m, typ := maps.NewTestMap[uint32, uint64](8)
+
+ key := uint32(0)
+ elem := uint64(256 + 0)
+
+ for i := 0; i < 8; i++ {
+ key += 1
+ elem += 1
+ m.Put(typ, unsafe.Pointer(&key), unsafe.Pointer(&elem))
+
+ if maps.DebugLog {
+ fmt.Printf("After put %d: %v\n", key, m)
+ }
+ }
+
+ if m.TableCount() != 0 {
+ t.Errorf("TableCount() got %d want 0", m.TableCount())
+ }
+
+ key = uint32(0)
+ elem = uint64(256 + 10)
+
+ for i := 0; i < 8; i++ {
+ key += 1
+ elem += 1
+ m.Put(typ, unsafe.Pointer(&key), unsafe.Pointer(&elem))
+
+ if maps.DebugLog {
+ fmt.Printf("After put %d: %v\n", key, m)
+ }
+ }
+
+ if m.TableCount() != 0 {
+ t.Errorf("TableCount() got %d want 0", m.TableCount())
+ }
+
+ key += 1
+ elem += 1
+ m.Put(typ, unsafe.Pointer(&key), unsafe.Pointer(&elem))
+
+ if maps.DebugLog {
+ fmt.Printf("After put %d: %v\n", key, m)
+ }
+
+ if m.TableCount() != 1 {
+ t.Errorf("TableCount() got %d want 1", m.TableCount())
+ }
+}
+
// Grow enough to cause a table split.
func TestMapSplit(t *testing.T) {
m, typ := maps.NewTestMap[uint32, uint64](0)
diff --git a/src/internal/runtime/maps/runtime.go b/src/internal/runtime/maps/runtime.go
index bd3ba6a..56d7e3e 100644
--- a/src/internal/runtime/maps/runtime.go
+++ b/src/internal/runtime/maps/runtime.go
@@ -180,9 +180,9 @@
}

if m.dirLen == 0 {
- if m.used < abi.MapGroupSlots {
- elem := m.putSlotSmall(typ, hash, key)
-
+ elem := m.putSlotSmall(typ, hash, key)
+ if elem != nil {
+ // Found an existing slot.
if m.writing == 0 {
fatal("concurrent map writes")
}
diff --git a/src/internal/runtime/maps/runtime_fast32.go b/src/internal/runtime/maps/runtime_fast32.go
index dc3bd3f..0c63d23 100644
--- a/src/internal/runtime/maps/runtime_fast32.go
+++ b/src/internal/runtime/maps/runtime_fast32.go
@@ -136,7 +136,8 @@
// more efficient than matchEmpty.
match = g.ctrls().matchEmptyOrDeleted()
if match == 0 {
- fatal("small map with no empty slot (concurrent map writes?)")
+ // No empty slot found. Need to grow the map.
+ return nil
}

i := match.first()
@@ -180,9 +181,9 @@
}

if m.dirLen == 0 {
- if m.used < abi.MapGroupSlots {
- elem := m.putSlotSmallFast32(typ, hash, key)
-
+ elem := m.putSlotSmallFast32(typ, hash, key)
+ if elem != nil {
+ // Found an existing slot.
if m.writing == 0 {
fatal("concurrent map writes")
}
diff --git a/src/internal/runtime/maps/runtime_fast64.go b/src/internal/runtime/maps/runtime_fast64.go
index dac89ee..086b3bb 100644
--- a/src/internal/runtime/maps/runtime_fast64.go
+++ b/src/internal/runtime/maps/runtime_fast64.go
@@ -128,7 +128,8 @@
// more efficient than matchEmpty.
match = g.ctrls().matchEmptyOrDeleted()
if match == 0 {
- fatal("small map with no empty slot (concurrent map writes?)")
+ // No empty slot found. Need to grow the map.
+ return nil
}

i := match.first()
@@ -172,9 +173,9 @@
}

if m.dirLen == 0 {
- if m.used < abi.MapGroupSlots {
- elem := m.putSlotSmallFast64(typ, hash, key)
-
+ elem := m.putSlotSmallFast64(typ, hash, key)
+ if elem != nil {
+ // Found an existing slot.
if m.writing == 0 {
fatal("concurrent map writes")
}
diff --git a/src/internal/runtime/maps/runtime_faststr.go b/src/internal/runtime/maps/runtime_faststr.go
index a96f9fe..431786f 100644
--- a/src/internal/runtime/maps/runtime_faststr.go
+++ b/src/internal/runtime/maps/runtime_faststr.go
@@ -212,7 +212,8 @@
// more efficient than matchEmpty.
match = g.ctrls().matchEmptyOrDeleted()
if match == 0 {
- fatal("small map with no empty slot (concurrent map writes?)")
+ // No empty slot found. Need to grow the map.
+ return nil
}

i := match.first()
@@ -256,9 +257,9 @@
}

if m.dirLen == 0 {
- if m.used < abi.MapGroupSlots {
- elem := m.putSlotSmallFastStr(typ, hash, key)
-
+ elem := m.putSlotSmallFastStr(typ, hash, key)
+ if elem != nil {
+ // Found an existing slot.
if m.writing == 0 {
fatal("concurrent map writes")
}

Change information

Files:
  • M src/internal/runtime/maps/map.go
  • M src/internal/runtime/maps/map_test.go
  • M src/internal/runtime/maps/runtime.go
  • M src/internal/runtime/maps/runtime_fast32.go
  • M src/internal/runtime/maps/runtime_fast64.go
  • M src/internal/runtime/maps/runtime_faststr.go
Change size: M
Delta: 6 files changed, 72 insertions(+), 22 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
Gerrit-Change-Number: 770303
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Gopher Robot (Gerrit)

unread,
Apr 24, 2026, 1:33:42 AM (5 days ago) Apr 24
to Gerrit Bot, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Message from Gopher Robot

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11 or adds a tag like "wait-release", it means that this CL will be
reviewed as part of the next development cycle. See https://go.dev/s/release
for more details.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
Gerrit-Change-Number: 770303
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Comment-Date: Fri, 24 Apr 2026 05:33:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Keith Randall (Gerrit)

unread,
Apr 24, 2026, 7:02:22 PM (4 days ago) Apr 24
to Gerrit Bot, goph...@pubsubhelper.golang.org, Michael Pratt, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
Attention needed from Michael Pratt

Keith Randall added 1 comment

File src/internal/runtime/maps/map.go
Line 502, Patchset 1 (Latest): elem := m.putSlotSmall(typ, hash, key)
Keith Randall . unresolved

I worry that this will add cost to the common case.

The common case is we are inserting distinct elements. On the 9th insert, we would normally just grow and insert into the larger table. Now we do some work looking for a spot in the small table, don't find one, and then do all the above anyway.

So it doesn't sound like an unambiguous win. When we're inserting duplicates, sure, but when we're not it is just extra overhead.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Pratt
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Comment-Date: Fri, 24 Apr 2026 23:02:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    和Hesen (Gerrit)

    unread,
    Apr 25, 2026, 7:05:08 AM (4 days ago) Apr 25
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Michael Pratt, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt

    和Hesen added 1 comment

    File src/internal/runtime/maps/map.go
    Line 502, Patchset 1 (Latest): elem := m.putSlotSmall(typ, hash, key)
    Keith Randall . unresolved

    I worry that this will add cost to the common case.

    The common case is we are inserting distinct elements. On the 9th insert, we would normally just grow and insert into the larger table. Now we do some work looking for a spot in the small table, don't find one, and then do all the above anyway.

    So it doesn't sound like an unambiguous win. When we're inserting duplicates, sure, but when we're not it is just extra overhead.

    和Hesen

    You're right that for the distinct-insert case the small-map scan is truly extra work — we still need another search after growing to place the key in the table. I should have been clearer about that.

    However, the amount of this extra work is tiny: scanning up to 8 slots is just a few pointer dereferences and key equality checks. The benchmark confirms this — about a 3.7% increase, or roughly 18 ns, on the 9th distinct insert.

    In return, the duplicate-update path (counters, caches, etc.) becomes nearly 7× faster and fully allocation-free (496.8 ns → 75.7 ns, 328 B → 0 B). More importantly, this ~18 ns overhead is a one-time cost in the small map's lifetime; once the map grows to a table, all subsequent inserts or updates incur no extra cost at all.

    I believe this trade-off is well worth it. That said, I'm very open to running additional benchmarks with different key distributions, or exploring fast-path refinements, if you'd like more data. Happy to follow your guidance.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Comment-Date: Sat, 25 Apr 2026 11:04:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Keith Randall <k...@golang.org>
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 27, 2026, 4:37:15 PM (2 days ago) Apr 27
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, Michael Pratt, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt

    Keith Randall added 1 comment

    File src/internal/runtime/maps/map.go
    Line 502, Patchset 1 (Latest): elem := m.putSlotSmall(typ, hash, key)
    Keith Randall . unresolved

    I worry that this will add cost to the common case.

    The common case is we are inserting distinct elements. On the 9th insert, we would normally just grow and insert into the larger table. Now we do some work looking for a spot in the small table, don't find one, and then do all the above anyway.

    So it doesn't sound like an unambiguous win. When we're inserting duplicates, sure, but when we're not it is just extra overhead.

    和Hesen

    You're right that for the distinct-insert case the small-map scan is truly extra work — we still need another search after growing to place the key in the table. I should have been clearer about that.

    However, the amount of this extra work is tiny: scanning up to 8 slots is just a few pointer dereferences and key equality checks. The benchmark confirms this — about a 3.7% increase, or roughly 18 ns, on the 9th distinct insert.

    In return, the duplicate-update path (counters, caches, etc.) becomes nearly 7× faster and fully allocation-free (496.8 ns → 75.7 ns, 328 B → 0 B). More importantly, this ~18 ns overhead is a one-time cost in the small map's lifetime; once the map grows to a table, all subsequent inserts or updates incur no extra cost at all.

    I believe this trade-off is well worth it. That said, I'm very open to running additional benchmarks with different key distributions, or exploring fast-path refinements, if you'd like more data. Happy to follow your guidance.

    Keith Randall

    This would only help maps which grow to exactly 8 elements, and then insert a duplicate item. Maps of any other size aren't helped. But when it helps, it helps *a lot*.

    But for all maps that grow to 9 elements or more, this is only overhead. Not much overhead, but some.

    So I guess what we really need to answer is: how often are each of these cases? What is their ratio compared to the improvement/overhead ratio?

    I hacked your CL to panic every time your CL triggers (duplicate insert when the map has 8 elements). It only triggers when running all.bash on internal/runtime/maps test cases. So it seems to happen exceedingly rarely, at least in the stdlib. So I think I'm leaning against doing this. We would need some evidence pointing in the other direction, I think, to continue.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Comment-Date: Mon, 27 Apr 2026 20:37:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Keith Randall <k...@golang.org>
    Comment-In-Reply-To: 和Hesen <releve...@gmail.com>
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 27, 2026, 4:56:51 PM (2 days ago) Apr 27
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, Michael Pratt, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt

    Keith Randall added 1 comment

    File src/internal/runtime/maps/map.go
    Line 502, Patchset 1 (Latest): elem := m.putSlotSmall(typ, hash, key)
    Keith Randall . unresolved

    I worry that this will add cost to the common case.

    The common case is we are inserting distinct elements. On the 9th insert, we would normally just grow and insert into the larger table. Now we do some work looking for a spot in the small table, don't find one, and then do all the above anyway.

    So it doesn't sound like an unambiguous win. When we're inserting duplicates, sure, but when we're not it is just extra overhead.

    和Hesen

    You're right that for the distinct-insert case the small-map scan is truly extra work — we still need another search after growing to place the key in the table. I should have been clearer about that.

    However, the amount of this extra work is tiny: scanning up to 8 slots is just a few pointer dereferences and key equality checks. The benchmark confirms this — about a 3.7% increase, or roughly 18 ns, on the 9th distinct insert.

    In return, the duplicate-update path (counters, caches, etc.) becomes nearly 7× faster and fully allocation-free (496.8 ns → 75.7 ns, 328 B → 0 B). More importantly, this ~18 ns overhead is a one-time cost in the small map's lifetime; once the map grows to a table, all subsequent inserts or updates incur no extra cost at all.

    I believe this trade-off is well worth it. That said, I'm very open to running additional benchmarks with different key distributions, or exploring fast-path refinements, if you'd like more data. Happy to follow your guidance.

    Keith Randall

    This would only help maps which grow to exactly 8 elements, and then insert a duplicate item. Maps of any other size aren't helped. But when it helps, it helps *a lot*.

    But for all maps that grow to 9 elements or more, this is only overhead. Not much overhead, but some.

    So I guess what we really need to answer is: how often are each of these cases? What is their ratio compared to the improvement/overhead ratio?

    I hacked your CL to panic every time your CL triggers (duplicate insert when the map has 8 elements). It only triggers when running all.bash on internal/runtime/maps test cases. So it seems to happen exceedingly rarely, at least in the stdlib. So I think I'm leaning against doing this. We would need some evidence pointing in the other direction, I think, to continue.

    Keith Randall

    Actually, hold on, that's something of a lie. Your CL (and hence my experiment) does not handle the int32/int64/string fast paths. I will retry after adding those cases.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Comment-Date: Mon, 27 Apr 2026 20:56:45 +0000
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 27, 2026, 4:57:30 PM (2 days ago) Apr 27
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, Michael Pratt, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt

    Keith Randall added 1 comment

    File src/internal/runtime/maps/map.go
    Line 502, Patchset 1 (Latest): elem := m.putSlotSmall(typ, hash, key)
    Keith Randall . unresolved

    I worry that this will add cost to the common case.

    The common case is we are inserting distinct elements. On the 9th insert, we would normally just grow and insert into the larger table. Now we do some work looking for a spot in the small table, don't find one, and then do all the above anyway.

    So it doesn't sound like an unambiguous win. When we're inserting duplicates, sure, but when we're not it is just extra overhead.

    和Hesen

    You're right that for the distinct-insert case the small-map scan is truly extra work — we still need another search after growing to place the key in the table. I should have been clearer about that.

    However, the amount of this extra work is tiny: scanning up to 8 slots is just a few pointer dereferences and key equality checks. The benchmark confirms this — about a 3.7% increase, or roughly 18 ns, on the 9th distinct insert.

    In return, the duplicate-update path (counters, caches, etc.) becomes nearly 7× faster and fully allocation-free (496.8 ns → 75.7 ns, 328 B → 0 B). More importantly, this ~18 ns overhead is a one-time cost in the small map's lifetime; once the map grows to a table, all subsequent inserts or updates incur no extra cost at all.

    I believe this trade-off is well worth it. That said, I'm very open to running additional benchmarks with different key distributions, or exploring fast-path refinements, if you'd like more data. Happy to follow your guidance.

    Keith Randall

    This would only help maps which grow to exactly 8 elements, and then insert a duplicate item. Maps of any other size aren't helped. But when it helps, it helps *a lot*.

    But for all maps that grow to 9 elements or more, this is only overhead. Not much overhead, but some.

    So I guess what we really need to answer is: how often are each of these cases? What is their ratio compared to the improvement/overhead ratio?

    I hacked your CL to panic every time your CL triggers (duplicate insert when the map has 8 elements). It only triggers when running all.bash on internal/runtime/maps test cases. So it seems to happen exceedingly rarely, at least in the stdlib. So I think I'm leaning against doing this. We would need some evidence pointing in the other direction, I think, to continue.

    Keith Randall

    Actually, hold on, that's something of a lie. Your CL (and hence my experiment) does not handle the int32/int64/string fast paths. I will retry after adding those cases.

    Keith Randall

    Your CL does, my hack didn't.

    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 27, 2026, 5:00:22 PM (2 days ago) Apr 27
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, Michael Pratt, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt

    Keith Randall added 2 comments

    File src/internal/runtime/maps/runtime_fast32.go
    Line 325, Patchset 1 (Parent): if m.used < abi.MapGroupSlots {
    Keith Randall . unresolved

    The ptr-shaped cases aren't handled.

    File src/internal/runtime/maps/runtime_fast64.go
    Line 355, Patchset 1 (Parent): if m.used < abi.MapGroupSlots {
    Keith Randall . unresolved

    The ptr-shaped cases aren't handled.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Comment-Date: Mon, 27 Apr 2026 21:00:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 27, 2026, 8:19:58 PM (2 days ago) Apr 27
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, Michael Pratt, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt

    Keith Randall added 1 comment

    File src/internal/runtime/maps/map.go
    Line 502, Patchset 1 (Latest): elem := m.putSlotSmall(typ, hash, key)
    Keith Randall . unresolved

    I worry that this will add cost to the common case.

    The common case is we are inserting distinct elements. On the 9th insert, we would normally just grow and insert into the larger table. Now we do some work looking for a spot in the small table, don't find one, and then do all the above anyway.

    So it doesn't sound like an unambiguous win. When we're inserting duplicates, sure, but when we're not it is just extra overhead.

    和Hesen

    You're right that for the distinct-insert case the small-map scan is truly extra work — we still need another search after growing to place the key in the table. I should have been clearer about that.

    However, the amount of this extra work is tiny: scanning up to 8 slots is just a few pointer dereferences and key equality checks. The benchmark confirms this — about a 3.7% increase, or roughly 18 ns, on the 9th distinct insert.

    In return, the duplicate-update path (counters, caches, etc.) becomes nearly 7× faster and fully allocation-free (496.8 ns → 75.7 ns, 328 B → 0 B). More importantly, this ~18 ns overhead is a one-time cost in the small map's lifetime; once the map grows to a table, all subsequent inserts or updates incur no extra cost at all.

    I believe this trade-off is well worth it. That said, I'm very open to running additional benchmarks with different key distributions, or exploring fast-path refinements, if you'd like more data. Happy to follow your guidance.

    Keith Randall

    This would only help maps which grow to exactly 8 elements, and then insert a duplicate item. Maps of any other size aren't helped. But when it helps, it helps *a lot*.

    But for all maps that grow to 9 elements or more, this is only overhead. Not much overhead, but some.

    So I guess what we really need to answer is: how often are each of these cases? What is their ratio compared to the improvement/overhead ratio?

    I hacked your CL to panic every time your CL triggers (duplicate insert when the map has 8 elements). It only triggers when running all.bash on internal/runtime/maps test cases. So it seems to happen exceedingly rarely, at least in the stdlib. So I think I'm leaning against doing this. We would need some evidence pointing in the other direction, I think, to continue.

    Keith Randall

    Actually, hold on, that's something of a lie. Your CL (and hence my experiment) does not handle the int32/int64/string fast paths. I will retry after adding those cases.

    Keith Randall

    Your CL does, my hack didn't.

    Keith Randall

    Ok, I have some better data.

    I hacked the runtime to track the number of maps for which:

    1. This CL triggers (1 group, all full, found existing key when inserting)
    2. Subset of 1 where the map subsequently grows
    3. Total times we grow from 1 group to >1 group.

    Then I compare 1 minus 2 (we get the benefit, and never end up growing that map) vs. 3.
    For the compiler, it seems to be around 5%. So this triggers for 1 out of 20 maps. Which kind of surprised me, I was expecting lower numbers. The linker is lower at 1%.

    Done for today, I will investigate more tomorrow. And post a WIP CL so people can double-check my work.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Comment-Date: Tue, 28 Apr 2026 00:19:53 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Gerrit Bot (Gerrit)

    unread,
    Apr 28, 2026, 8:03:37 AM (21 hours ago) Apr 28
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Keith Randall and Michael Pratt

    Gerrit Bot uploaded new patchset

    Gerrit Bot uploaded patch set #2 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keith Randall
    • Michael Pratt
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Keith Randall <k...@golang.org>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    unsatisfied_requirement
    open
    diffy

    和Hesen (Gerrit)

    unread,
    Apr 28, 2026, 8:45:55 AM (21 hours ago) Apr 28
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Michael Pratt, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Keith Randall and Michael Pratt

    和Hesen added 3 comments

    File src/internal/runtime/maps/map.go
    Line 502, Patchset 1: elem := m.putSlotSmall(typ, hash, key)
    和Hesen

    I've submitted another version, in which I optimized the performance of inserting a new key into a full small map by using the `uncheckedPutSlotForAssign*` functions, and re-ran the benchmarks. The data shows that, compared to the previous version, inserting a new key into a full small map now also yields positive gains. I've put the specific data in the issue.

    File src/internal/runtime/maps/runtime_fast32.go
    Line 325, Patchset 1 (Parent): if m.used < abi.MapGroupSlots {
    Keith Randall . resolved

    The ptr-shaped cases aren't handled.

    和Hesen

    Done

    File src/internal/runtime/maps/runtime_fast64.go
    Line 355, Patchset 1 (Parent): if m.used < abi.MapGroupSlots {
    Keith Randall . resolved

    The ptr-shaped cases aren't handled.

    和Hesen

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keith Randall
    • Michael Pratt
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Keith Randall <k...@golang.org>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Comment-Date: Tue, 28 Apr 2026 12:45:46 +0000
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 28, 2026, 8:51:38 PM (8 hours ago) Apr 28
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Keith Randall, 和Hesen, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt and 和Hesen

    Keith Randall voted and added 3 comments

    Votes added by Keith Randall

    Commit-Queue+1

    3 comments

    File src/internal/runtime/maps/map.go
    Line 502, Patchset 1: elem := m.putSlotSmall(typ, hash, key)
    Keith Randall . resolved
    Keith Randall

    Ok, I've come around to this being net positive. It happens often enough, at least to my hacky experiments. Let's do it.

    Line 508, Patchset 2 (Latest): m.used++
    Keith Randall . unresolved

    All of these `m.used++` look redundant to the ones inside uncheckedPutSlotForAssign.

    Does checkInvariants fail? It should...

    File src/internal/runtime/maps/table.go
    Line 433, Patchset 2 (Latest):func (t *table) uncheckedPutSlotForAssign(typ *abi.MapType, hash uintptr, key unsafe.Pointer) unsafe.Pointer {
    Keith Randall . unresolved

    This will only ever be called with a 2-group table, right?

    Maybe not worth taking advantage of at the moment. But maybe an assertion or even just a comment to that effect would be clarifying.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    • 和Hesen
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Attention: 和Hesen <releve...@gmail.com>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 00:51:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 28, 2026, 8:52:04 PM (8 hours ago) Apr 28
    to Gerrit Bot, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, 和Hesen, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt and 和Hesen

    Keith Randall added 1 comment

    File src/internal/runtime/maps/map.go
    Keith Randall . unresolved

    All of these `m.used++` look redundant to the ones inside uncheckedPutSlotForAssign.

    Does checkInvariants fail? It should...

    Keith Randall

    Or, it should if `debugLog` is set to true.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    • 和Hesen
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Attention: 和Hesen <releve...@gmail.com>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 00:52:00 +0000
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 28, 2026, 9:03:30 PM (8 hours ago) Apr 28
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, 和Hesen, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt and 和Hesen

    Keith Randall voted and added 1 comment

    Votes added by Keith Randall

    Code-Review+2

    1 comment

    File src/internal/runtime/maps/map.go
    Keith Randall . resolved

    All of these `m.used++` look redundant to the ones inside uncheckedPutSlotForAssign.

    Does checkInvariants fail? It should...

    Keith Randall

    Or, it should if `debugLog` is set to true.

    Keith Randall

    Never mind. One is map.used, one is table.used.
    Definitely confusing though. Probably could use some clarifying notes.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    • 和Hesen
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Attention: 和Hesen <releve...@gmail.com>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 01:03:25 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 28, 2026, 9:10:56 PM (8 hours ago) Apr 28
    to Gerrit Bot, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, 和Hesen, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt and 和Hesen

    Keith Randall voted Commit-Queue+1

    Commit-Queue+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    • 和Hesen
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Attention: 和Hesen <releve...@gmail.com>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 01:10:52 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    和Hesen (Gerrit)

    unread,
    Apr 28, 2026, 9:54:55 PM (7 hours ago) Apr 28
    to Gerrit Bot, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt

    和Hesen added 1 comment

    File src/internal/runtime/maps/table.go
    Line 433, Patchset 2 (Latest):func (t *table) uncheckedPutSlotForAssign(typ *abi.MapType, hash uintptr, key unsafe.Pointer) unsafe.Pointer {
    Keith Randall . resolved

    This will only ever be called with a 2-group table, right?

    Maybe not worth taking advantage of at the moment. But maybe an assertion or even just a comment to that effect would be clarifying.

    和Hesen

    I think whether it can be used has nothing to do with the number of groups—it can only be called when we are sure that the key is not already in the table, which is already stated in the comments. However, as of now, it is indeed only used for two-group tables right after a rehash. I've also added a new comment.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 01:54:47 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Gerrit Bot (Gerrit)

    unread,
    Apr 28, 2026, 10:06:36 PM (7 hours ago) Apr 28
    to 和Hesen, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Keith Randall and Michael Pratt

    Gerrit Bot uploaded new patchset

    Gerrit Bot uploaded patch set #3 to this change.
    Following approvals got outdated and were removed:
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keith Randall
    • Michael Pratt
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 3
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 28, 2026, 10:11:51 PM (7 hours ago) Apr 28
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt

    Keith Randall voted

    Auto-Submit+1
    Code-Review+2
    Commit-Queue+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 3
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 02:11:47 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 28, 2026, 10:12:30 PM (7 hours ago) Apr 28
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt

    Keith Randall voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Pratt
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 3
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Keith Randall <k...@google.com>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 02:12:26 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 28, 2026, 10:44:48 PM (7 hours ago) Apr 28
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Keith Randall, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Michael Pratt

    Keith Randall voted Commit-Queue+1

    Commit-Queue+1
    Gerrit-Comment-Date: Wed, 29 Apr 2026 02:44:44 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Gerrit Bot (Gerrit)

    unread,
    Apr 28, 2026, 10:53:28 PM (6 hours ago) Apr 28
    to 和Hesen, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Keith Randall, Keith Randall and Michael Pratt

    Gerrit Bot uploaded new patchset

    Gerrit Bot uploaded patch set #4 to this change.
    Following approvals got outdated and were removed:
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keith Randall
    • Keith Randall
    • Michael Pratt
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 4
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Keith Randall <k...@google.com>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Keith Randall <k...@golang.org>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Attention: Keith Randall <k...@google.com>
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    12:36 AM (5 hours ago) 12:36 AM
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Keith Randall and Michael Pratt

    Keith Randall voted Commit-Queue+1

    Commit-Queue+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keith Randall
    • Michael Pratt
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I087abf8f74b73dbc7498319dc000832a993ee0bd
    Gerrit-Change-Number: 770303
    Gerrit-PatchSet: 4
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Keith Randall <k...@google.com>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: 和Hesen <releve...@gmail.com>
    Gerrit-Attention: Michael Pratt <mpr...@google.com>
    Gerrit-Attention: Keith Randall <k...@google.com>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 04:36:49 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    1:20 AM (4 hours ago) 1:20 AM
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Keith Randall, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Gerrit-Comment-Date: Wed, 29 Apr 2026 05:20:32 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    1:41 AM (4 hours ago) 1:41 AM
    to Gerrit Bot, 和Hesen, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Keith Randall, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com
    Gerrit-Comment-Date: Wed, 29 Apr 2026 05:41:26 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages