Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: golang/time
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.11.0
Choose a base ref
...
head repository: golang/time
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.12.0
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jun 4, 2025

  1. rate: skip time.Now call in Sometimes.Do unless necessary

    Don't update Sometimes.last if Interval is not configured.
    
    goos: darwin
    goarch: arm64
    pkg: golang.org/x/time/rate
                              │ /tmp/before.txt │           /tmp/after.txt            │
                              │     sec/op      │   sec/op     vs base                │
    Sometimes/no-interval-8         14.81n ± 0%   11.96n ± 0%  -19.25% (p=0.000 n=10)
    Sometimes/with-interval-8       27.30n ± 2%   27.57n ± 2%        ~ (p=0.780 n=10)
    geomean                         20.10n        18.15n        -9.70%
    
    goos: linux
    goarch: arm64
    pkg: golang.org/x/time/rate
                              │ /tmp/before-rpi.txt │         /tmp/after-rpi.txt          │
                              │       sec/op        │   sec/op     vs base                │
    Sometimes/no-interval-4             89.72n ± 4%   77.03n ± 2%  -14.15% (p=0.000 n=10)
    Sometimes/with-interval-4           147.1n ± 0%   147.8n ± 3%   +0.48% (p=0.005 n=10)
    geomean                             114.9n        106.7n        -7.12%
    
    Change-Id: Ie4a064625432b9628a1cc5686eca9f0b3b90fb7b
    Reviewed-on: https://go-review.googlesource.com/c/time/+/561956
    Reviewed-by: Carlos Amedee <carlos@golang.org>
    Auto-Submit: Sean Liao <sean@liao.dev>
    Reviewed-by: Sean Liao <sean@liao.dev>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
    artyom authored and gopherbot committed Jun 4, 2025
    Configuration menu
    Copy the full SHA
    1616a7f View commit details
    Browse the repository at this point in the history
Loading