Skip to content

Bump go version to 1.21#4938

Merged
MichaelEischer merged 5 commits intorestic:masterfrom
MichaelEischer:bump-go-version
Aug 10, 2024
Merged

Bump go version to 1.21#4938
MichaelEischer merged 5 commits intorestic:masterfrom
MichaelEischer:bump-go-version

Conversation

@MichaelEischer
Copy link
Copy Markdown
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.

Copy link
Copy Markdown
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

@sergeevabc
Copy link
Copy Markdown

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

@MichaelEischer
Copy link
Copy Markdown
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
Copy Markdown

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