8000 Bump go version to 1.21 by MichaelEischer · Pull Request #4938 · restic/restic · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bump go version to 1.21 #4938

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

Merged
merged 5 commits into from
Aug 10, 2024
Merged

Conversation

MichaelEischer
Copy link
Member

What does this PR change? What problem does it solve?

Increase the required Go version to 1.21 and update all direct dependencies. This will finally allow using the maps and slices packages. I've also removed usages of sha256-simd similar to minio/minio-go#1958 .

Was the change previously discussed in an issue or on the forum?

No.

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • [ ] I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

The std library now also supports the sha assembly instructions on
ARM64. Thus, sha256-simd no longer provides a performance benefit.
Copy link
Member Author
@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MichaelEischer MichaelEischer merged commit 3f5e216 into restic:master Aug 10, 2024
11 checks passed
@MichaelEischer MichaelEischer deleted the bump-go-version branch August 10, 2024 17:58
@sergeevabc
Copy link

Does crypto/sha256 work with processors without SSE4 and AVX?

@MichaelEischer
Copy link
Member Author

Does crypto/sha256 work with processors without SSE4 and AVX?

I'd expect so. As you seem to have access to such an old CPU, just run go test -bench . crypto/sha256 to give it a try.

@sergeevabc
Copy link
sergeevabc commented Mar 27, 2025
$ ver && go version
Microsoft Windows [Version 6.1.7601]
go version go1.23.6 windows/amd64

$ go test -bench . crypto/sha256
goos: windows
goarch: amd64
pkg: crypto/sha256
cpu: Intel(R) Core(TM)2 Duo CPU     T7250  @ 2.00GHz
BenchmarkHash8Bytes/New-2                1653452               728.7 ns/op        10.98 MB/s           0 B/op          0 allocs/op
BenchmarkHash8Bytes/Sum224-2             1688442               707.6 ns/op        11.31 MB/s           0 B/op          0 allocs/op
BenchmarkHash8Bytes/Sum256-2             1684946               704.1 ns/op        11.36 MB/s           0 B/op          0 allocs/op
BenchmarkHash1K/New-2                     121077              9845 ns/op         104.02 MB/s           0 B/op          0 allocs/op
BenchmarkHash1K/Sum224-2                  120547              9880 ns/op         103.64 MB/s           0 B/op          0 allocs/op
BenchmarkHash1K/Sum256-2                  121282              9890 ns/op         103.54 MB/s           0 B/op          0 allocs/op
BenchmarkHash8K/New-2                      16238             73778 ns/op         111.04 MB/s           0 B/op          0 allocs/op
BenchmarkHash8K/Sum224-2                   16306             73792 ns/op         111.01 MB/s           0 B/op          0 allocs/op
BenchmarkHash8K/Sum256-2                   16172             73933 ns/op         110.80 MB/s           0 B/op          0 allocs/op
PASS
ok      crypto/sha256   15.647s

I believe Blake3 hash should be working faster here.
If there is a command for that, I am ready to compare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0