Skip to content

Instantly share code, notes, and snippets.

@monocasa
Created January 10, 2022 21:45
Show Gist options
  • Save monocasa/befeed9c8c5827417c0921e231703f2c to your computer and use it in GitHub Desktop.
Save monocasa/befeed9c8c5827417c0921e231703f2c to your computer and use it in GitHub Desktop.
crypto/256 benchmarks. (shani versus master)
~/src/go $ ../bin/go test -bench . -benchmem crypto/sha256/
goos: linux
goarch: amd64
pkg: crypto/sha256
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkHash8Bytes-8 6923472 168.6 ns/op 47.45 MB/s 0 B/op 0 allocs/op
BenchmarkHash1K-8 506968 2238 ns/op 457.62 MB/s 0 B/op 0 allocs/op
BenchmarkHash8K-8 70969 16687 ns/op 490.91 MB/s 0 B/op 0 allocs/op
PASS
ok crypto/sha256 3.861s
~/src/go-shani $ ../bin/go test -bench . -benchmem crypto/sha256/
goos: linux
goarch: amd64
pkg: crypto/sha256
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkHash8Bytes-8 15755192 70.55 ns/op 113.39 MB/s 0 B/op 0 allocs/op
BenchmarkHash1K-8 1959190 620.7 ns/op 1649.82 MB/s 0 B/op 0 allocs/op
BenchmarkHash8K-8 244402 4398 ns/op 1862.69 MB/s 0 B/op 0 allocs/op
PASS
ok crypto/sha256 4.155s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment