]> Cypherpunks repositories - gostls13.git/commit
runtime: transfer whole span from MCentral to MCache
authorDmitriy Vyukov <dvyukov@google.com>
Wed, 15 May 2013 14:35:05 +0000 (18:35 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Wed, 15 May 2013 14:35:05 +0000 (18:35 +0400)
commit23ad56311977b4a4bfff78fb5f674616e0272445
tree5c993ef73e331b3f886c2cb81fd3c76f4554903e
parente85e67889931e10908e912622a6954943fb28ed5
runtime: transfer whole span from MCentral to MCache
Finer-grained transfers were relevant with per-M caches,
with per-P caches they are not relevant and harmful for performance.
For few small size classes where it makes difference,
it's fine to grab the whole span (4K).

benchmark          old ns/op    new ns/op    delta
BenchmarkMalloc           42           40   -4.45%

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/9374043
src/pkg/runtime/malloc.h
src/pkg/runtime/mcache.c
src/pkg/runtime/mcentral.c
src/pkg/runtime/msize.c