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: don't do unnecessary loads on malloc fast path #8887

Open
dvyukov opened this Issue Oct 7, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@dvyukov
Member

dvyukov commented Oct 7, 2014

Currently we load runtime.memstats.heap_alloc and runtime.MemProfileRate on every
malloc. Both are not strictly necessary and bring 2 unnecessary cache lines into cache.

Here are proof-of-concept CLs:
https://golang.org/cl/129810043/
https://golang.org/cl/128100043/

Ideally we trigger GC directly from mcacheRefill, but it's not trivial to implement.
@rsc

This comment has been minimized.

Contributor

rsc commented Oct 7, 2014

Comment 1:

Is this causing a performance problem?

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@rsc rsc removed release-none labels Apr 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment