]> Cypherpunks repositories - gostls13.git/commit
runtime: allocate goroutine ids in batches
authorDmitriy Vyukov <dvyukov@google.com>
Wed, 22 Jan 2014 06:34:36 +0000 (10:34 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Wed, 22 Jan 2014 06:34:36 +0000 (10:34 +0400)
commit98b50b89a8002e1a40f28d1851d0223d424825f6
tree112653f6cfbd1bba5d79c5b47d4cf16cae178226
parent8a3c587dc1a5f7a9cd87b764b74e28a57935ab40
runtime: allocate goroutine ids in batches
Helps reduce contention on sched.goidgen.

benchmark                               old ns/op    new ns/op    delta
BenchmarkCreateGoroutines-16                  259          237   -8.49%
BenchmarkCreateGoroutinesParallel-16          127           43  -66.06%

R=golang-codereviews, dave, bradfitz, khr
CC=golang-codereviews, rsc
https://golang.org/cl/46970043
src/pkg/runtime/proc.c
src/pkg/runtime/runtime.h