Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rate: avoid creating timer in WaitN if delay is zero #5

Closed
wants to merge 1 commit into from

Conversation

bpot
Copy link
Contributor

@bpot bpot commented Apr 11, 2018

name old time/op new time/op delta
AllowN-4 76.7ns ± 6% 76.6ns ± 3% ~ (p=0.897 n=10+10)
WaitNNoDelay-4 1.36µs ± 3% 0.10µs ± 1% -92.64% (p=0.000 n=10+9)

name old alloc/op new alloc/op delta
AllowN-4 0.00B 0.00B ~ (all equal)
WaitNNoDelay-4 208B ± 0% 0B -100.00% (p=0.000 n=10+10)

name old allocs/op new allocs/op delta
AllowN-4 0.00 0.00 ~ (all equal)
WaitNNoDelay-4 3.00 ± 0% 0.00 -100.00% (p=0.000 n=10+10)

name      old time/op    new time/op    delta
AllowN-4    76.7ns ± 6%    76.6ns ± 3%      ~     (p=0.897 n=10+10)
WaitNNoDelay-4     1.36µs ± 3%    0.10µs ± 1%   -92.64%  (p=0.000 n=10+9)

name      old alloc/op   new alloc/op   delta
AllowN-4     0.00B          0.00B           ~     (all equal)
WaitNNoDelay-4       208B ± 0%        0B       -100.00%  (p=0.000 n=10+10)

name      old allocs/op  new allocs/op  delta
AllowN-4      0.00           0.00           ~     (all equal)
WaitNNoDelay-4       3.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
@gopherbot
Copy link

This PR (HEAD: 2284b8e) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/#/c/time/+/106461 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/106461.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Brad Fitzpatrick:

Patch Set 1: Run-TryBot+1 Code-Review+2

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/106461.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 1:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=4ede8b2e


Please don’t reply on this GitHub thread. Visit golang.org/cl/106461.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 1: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/106461.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Bob Potter:

Patch Set 2: Commit message was updated.


Please don’t reply on this GitHub thread. Visit golang.org/cl/106461.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gerrit Bot:

Uploaded patch set 3: Commit message was updated.


Please don’t reply on this GitHub thread. Visit golang.org/cl/106461.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Brad Fitzpatrick:

Patch Set 3:

The commit message still has Markdown.


Please don’t reply on this GitHub thread. Visit golang.org/cl/106461.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gerrit Bot:

Uploaded patch set 4: Commit message was updated.


Please don’t reply on this GitHub thread. Visit golang.org/cl/106461.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Apr 12, 2018
name      old time/op    new time/op    delta
AllowN-4    76.7ns ± 6%    76.6ns ± 3%      ~     (p=0.897 n=10+10)
WaitNNoDelay-4     1.36µs ± 3%    0.10µs ± 1%   -92.64%  (p=0.000 n=10+9)

name      old alloc/op   new alloc/op   delta
AllowN-4     0.00B          0.00B           ~     (all equal)
WaitNNoDelay-4       208B ± 0%        0B       -100.00%  (p=0.000 n=10+10)

name      old allocs/op  new allocs/op  delta
AllowN-4      0.00           0.00           ~     (all equal)
WaitNNoDelay-4       3.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)

Change-Id: I83addc3b3f7b053d6eee637fe188e21ca9b39f11
GitHub-Last-Rev: 2284b8e
GitHub-Pull-Request: #5
Reviewed-on: https://go-review.googlesource.com/106461
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot
Copy link

This PR is being closed because golang.org/cl/106461 has been merged.

@gopherbot gopherbot closed this Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants