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

dvyukov opened this issue Oct 7, 2014 · 1 comment


Copy link

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:

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

This comment has been minimized.

Copy link

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
None yet
2 participants
You can’t perform that action at this time.