]> Cypherpunks repositories - gostls13.git/commit
runtime: do not call timeBeginPeriod on windows
authorAlex Brainman <alex.brainman@gmail.com>
Mon, 23 Nov 2015 04:26:00 +0000 (15:26 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 24 Nov 2015 01:11:58 +0000 (01:11 +0000)
commitab4c9298b8185a056ff1152f2c7bd9b38d3d06f3
tree476b6ddea89d3796c86576bd4af0547c380ec49a
parentb5fe07710f4a31bfc100fbc2e344be11e4b4d3fc
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>
src/runtime/export_windows_test.go
src/runtime/os1_windows.go
src/runtime/syscall_windows_test.go