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

Comments

Projects
None yet
2 participants
@josharian
Contributor

josharian commented Apr 10, 2016

[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

This comment has been minimized.

Contributor

josharian commented Apr 10, 2016

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