pkg/proc: add GOEXPERIMENT=mapsplitgroup support#4274
Open
prattmic wants to merge 1 commit intogo-delve:masterfrom
Open
pkg/proc: add GOEXPERIMENT=mapsplitgroup support#4274prattmic wants to merge 1 commit intogo-delve:masterfrom
prattmic wants to merge 1 commit intogo-delve:masterfrom
Conversation
https://go.dev/cl/711560 adds GOEXPERIMENT=mapsplitgroup which changes the layout of map groups from KVKVKVKV to KKKKVVVV. This GOEXPERIMENT may or may not be enabled permanently, depending on its performance impact, but I needed delve support for some debugging, so I went ahead and implemented support. In the map iterator we determine which layout the map is using based on the presence of keys and elems fields in the group type instead of a slots field.
Contributor
Author
|
I'm not sure that you want to merge this yet, but I needed it for testing, so I figured I might as well send it. cc @jakebailey |
aarzilli
reviewed
Mar 5, 2026
Member
aarzilli
left a comment
There was a problem hiding this comment.
It would need a test after the CL gets merged, more or less a copy of TestClassicMap with just the t.Setenv line changed (or better put the code of TestClassicMap in an helper function and pass in the value for GOEXPERIMENT as argument)
| var err1, err2 error | ||
| it.curKey, err1 = it.group.keys.sliceAccess(int(it.slotIdx)) | ||
| it.curValue, err2 = it.group.elems.sliceAccess(int(it.slotIdx)) | ||
| if err1 != nil || err2 != nil { |
Member
There was a problem hiding this comment.
I'd move this outside of the if.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://go.dev/cl/711560 adds GOEXPERIMENT=mapsplitgroup which changes the layout of map groups from KVKVKVKV to KKKKVVVV.
This GOEXPERIMENT may or may not be enabled permanently, depending on its performance impact, but I needed delve support for some debugging, so I went ahead and implemented support.
In the map iterator we determine which layout the map is using based on the presence of keys and elems fields in the group type instead of a slots field.