Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3065)

Issue 13273044: code review 13273044: time: make Timer scalable

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by funny.falcon
Modified:
10 years, 1 month ago
CC:
golang-codereviews
Visibility:
Public.

Description

time: make Timer scalable With this change, time.Timer is backed by userspace heaps with single runtimeTimer per heap. Heaps number is multiply of GOMAXPROCS and changed dinamically. Ticker is not changed and still uses runtimeTimer, cause I assume that it is strange to have many thousangs of ticker. Without ticker, heap code could be simplified a bit, and no need to store interval in Timer. benchmark old ns/op new ns/op delta BenchmarkAfterFunc 6593 1016 -84.59% BenchmarkAfterFunc-2 4039 702 -82.62% BenchmarkAfterFunc-3 5851 545 -90.69% BenchmarkAfterFunc-4 8694 469 -94.61% BenchmarkAfter 6969 1064 -84.73% BenchmarkAfter-2 3837 728 -81.03% BenchmarkAfter-3 5853 545 -90.69% BenchmarkAfter-4 8796 553 -93.71% BenchmarkStop 498 554 +11.24% BenchmarkStop-2 566 375 -33.75% BenchmarkStop-3 676 289 -57.25% BenchmarkStop-4 759 250 -67.06% BenchmarkSimultaneousAfterFunc 603 585 -2.99% BenchmarkSimultaneousAfterFunc-2 640 383 -40.16% BenchmarkSimultaneousAfterFunc-3 789 296 -62.48% BenchmarkSimultaneousAfterFunc-4 741 284 -61.67% BenchmarkStartStop 236 229 -2.97% BenchmarkStartStop-2 210 284 +35.24% BenchmarkStartStop-3 275 198 -28.00% BenchmarkStartStop-4 302 170 -43.71% BenchmarkTicker 59182 59199 +0.03% BenchmarkTicker-2 61678 61479 -0.32% BenchmarkTicker-3 61712 61855 +0.23% BenchmarkTicker-4 61761 61825 +0.10% Fixes issue 6239.

Patch Set 1 #

Patch Set 2 : diff -r 2f13cc5d7043 https://code.google.com/p/go #

Patch Set 3 : diff -r 2f13cc5d7043 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -33 lines) Patch
M src/pkg/time/sleep.go View 1 4 chunks +249 lines, -33 lines 0 comments Download
M src/pkg/time/tick.go View 1 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 11
funny.falcon
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 8 months ago (2013-08-27 12:18:51 UTC) #1
r
I appreciate your enthusiasm but +249 lines to a relatively minor runtime component requires some ...
10 years, 8 months ago (2013-08-27 13:04:30 UTC) #2
funny.falcon
On 2013/08/27 13:04:30, r wrote: > I appreciate your enthusiasm but +249 lines to a ...
10 years, 8 months ago (2013-08-27 13:15:33 UTC) #3
funny.falcon
Any way, consider this change as a proposal and share of design. I settle with ...
10 years, 8 months ago (2013-08-27 13:23:32 UTC) #4
dvyukov
On 2013/08/27 12:18:51, funny.falcon wrote: > Hello mailto:golang-dev@googlegroups.com (cc: mailto:golang-dev@googlegroups.com), > > I'd like you ...
10 years, 8 months ago (2013-08-27 14:10:36 UTC) #5
dvyukov
On 2013/08/27 14:10:36, dvyukov wrote: > On 2013/08/27 12:18:51, funny.falcon wrote: > > Hello mailto:golang-dev@googlegroups.com ...
10 years, 8 months ago (2013-08-27 14:18:13 UTC) #6
funny.falcon
Oh, I pressed "answere" instead of "answere to all" when answered to Dmitry. Excuse me ...
10 years, 8 months ago (2013-08-27 16:53:17 UTC) #7
r
My point is that we don't do proposals by first sending in code for review. ...
10 years, 8 months ago (2013-08-28 01:05:16 UTC) #8
dvyukov
On 2013/08/27 16:53:17, funny.falcon wrote: > Oh, I pressed "answere" instead of "answere to all" ...
10 years, 8 months ago (2013-08-30 11:14:34 UTC) #9
gobot
Replacing golang-dev with golang-codereviews.
10 years, 4 months ago (2013-12-20 16:26:00 UTC) #10
rsc
10 years, 1 month ago (2014-03-05 20:27:15 UTC) #11
R=close
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b