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

runtime: avoid unnecessary work in allocSpanLocked #15226

Open
josharian opened this issue Apr 10, 2016 · 1 comment
Open

runtime: avoid unnecessary work in allocSpanLocked #15226

josharian opened this issue Apr 10, 2016 · 1 comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@josharian
Copy link
Contributor

[moved from #14921]

These two lines in "*mheap.allocSpanLocked" are (or hopefully will soon be) the most common source of writebarrierptr calls for which *dst == src.

588:        h_spans[p-1] = s

603:        h_spans[p+n] = s

(Line numbers from commit de7ee57.)

As @aclements notes, this might be best addressed by algorithmic improvements. If those assignments are doing nothing, probably lots of the surrounding code is either.

@josharian josharian added this to the Unplanned milestone Apr 10, 2016
@josharian
Copy link
Contributor Author

Possibly also worth investigating is mgc.go lines 1725 and 1726 (gcCopySpans). See #14921.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

3 participants