diff options
author | Alex Brainman <alex.brainman@gmail.com> | 2015-11-23 15:26:00 +1100 |
---|---|---|
committer | Alex Brainman <alex.brainman@gmail.com> | 2015-11-24 01:11:58 +0000 |
commit | ab4c9298b8185a056ff1152f2c7bd9b38d3d06f3 (patch) | |
tree | 476b6ddea89d3796c86576bd4af0547c380ec49a /src/runtime/export_windows_test.go | |
parent | b5fe07710f4a31bfc100fbc2e344be11e4b4d3fc (diff) | |
download | go-ab4c9298b8185a056ff1152f2c7bd9b38d3d06f3.tar.gz go-ab4c9298b8185a056ff1152f2c7bd9b38d3d06f3.zip |
runtime: do not call timeBeginPeriod on windows
Calling timeBeginPeriod changes Windows global timer resolution
from 15ms to 1ms. This used to improve Go runtime scheduler
performance, but not anymore. Thanks to @aclements, scheduler now
behaves the same way if we call timeBeginPeriod or not.
Remove call to timeBeginPeriod, since it is machine global
resource, and there are downsides of using low timer resolution.
See issue #8687 for details.
Fixes #8687
Change-Id: Ib7e41aa4a81861b62a900e0e62776c9ef19bfb73
Reviewed-on: https://go-review.googlesource.com/17164
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/runtime/export_windows_test.go')
-rw-r--r-- | src/runtime/export_windows_test.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/runtime/export_windows_test.go b/src/runtime/export_windows_test.go index 703b422ac2..f712c6f653 100644 --- a/src/runtime/export_windows_test.go +++ b/src/runtime/export_windows_test.go @@ -8,10 +8,7 @@ package runtime import "unsafe" -var ( - TestingWER = &testingWER - TimeBeginPeriodRetValue = &timeBeginPeriodRetValue -) +var TestingWER = &testingWER func NumberOfProcessors() int32 { var info systeminfo |