Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
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: docker/go-units
base: v0.4.0
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
...
head repository: docker/go-units
compare: v0.5.0
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
- 6 commits
- 2 files changed
- 3 contributors
Commits on May 16, 2022
-
size_test: add tests for 0.3 + suffix
Such sizes are quite valid but were never tested. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for af07f36 - Browse repository at this point
Copy the full SHA af07f36View commit details -
size_test: add parseSize benchmark
Shows on my laptop (6 iterations processed by benchstat): name time/op ParseSize-4 10.6µs ± 3% name alloc/op ParseSize-4 3.26kB ± 0% name allocs/op ParseSize-4 72.0 ± 0% Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1d23ffa - Browse repository at this point
Copy the full SHA 1d23ffaView commit details -
size_test: add t.Helper annotations
This way, error messages will show correct line information. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 54c3e55 - Browse repository at this point
Copy the full SHA 54c3e55View commit details -
Co-authored-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for cec4960 - Browse repository at this point
Copy the full SHA cec4960View commit details -
Using a regular expression brings in the whole regexp and regexp/syntax packages, which increase the resulting binary size by about 130K (Go 1.18.1, Linux/amd64). Besides, regular expressions are generally slow and incur some initialization overhead (to compile all global regexp.MustComplile variables). This, unlike the size difference, is not the main motivation for this commit, but it feels like it should have also been mentioned. A quick benchmark comparison shows a huge improvement (again, this is not why this is done, nevertheless it pleases the eye): name old time/op new time/op delta ParseSize-4 10.6µs ± 3% 2.6µs ±29% -75.10% (p=0.002 n=6+6) name old alloc/op new alloc/op delta ParseSize-4 3.26kB ± 0% 0.20kB ± 0% -93.75% (p=0.000 n=7+6) name old allocs/op new allocs/op delta ParseSize-4 72.0 ± 0% 26.0 ± 0% -63.89% (p=0.000 n=7+6) Compatibility note: As a result, we are now a but more relaxed to the input, allowing e.g. ".4 Gb", or "-0", or "234. B", following the rules of strconv.ParseFloat. It seems that those were previously rejected as a result of a regex being used, not deliberately. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7375726 - Browse repository at this point
Copy the full SHA 7375726View commit details
Commits on May 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e682442 - Browse repository at this point
Copy the full SHA e682442View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.4.0...v0.5.0