Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile, runtime: handle map misses for large value types without allocating a large zerobuffer #12337

Closed
mwhudson opened this issue Aug 26, 2015 · 2 comments

Comments

@mwhudson
Copy link
Contributor

Currently, the hashmap code in runtime maintains a zero buffer that is large enough for any type that has been seen in a map. Enlarging this buffer when a type larger than any before has been seen requires the code to use atomic chicanery. It would be much better to have the runtime always return a pointer to a fixed size buffer on a miss, and having the compiler handle large (fsov; perhaps larger than 256 bytes) map misses by checking the return value against this runtime.zeroptr and explicitly zeroing the value rather than copying zeros from the buffer to it.

@mwhudson
Copy link
Contributor Author

cc @randall77, I don't have privs to assign this to you

@randall77 randall77 self-assigned this Aug 26, 2015
@randall77 randall77 added this to the Go1.6 milestone Aug 26, 2015
@rsc rsc modified the milestones: Unplanned, Go1.6 Nov 4, 2015
@gopherbot
Copy link

CL https://golang.org/cl/22221 mentions this issue.

@mikioh mikioh closed this as completed Apr 19, 2016
@mikioh mikioh reopened this Apr 19, 2016
@golang golang locked and limited conversation to collaborators Apr 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants