Benchmarks with Go

Benchmark test in Go

hash_test.go

Run code

go test hash_test.go -bench .

Result

goos: windows
goarch: amd64
BenchmarkFNV32-8         3000000               415 ns/op
BenchmarkFNV64-8         3000000               426 ns/op
BenchmarkFNV128-8        3000000               428 ns/op
BenchmarkMD5-8           2000000               589 ns/op
BenchmarkSHA1-8          2000000               708 ns/op
BenchmarkSHA224-8        2000000               883 ns/op
BenchmarkSHA256-8        2000000               854 ns/op
BenchmarkSHA512-8        2000000               991 ns/op
PASS
ok      command-line-arguments  17.893s
comments powered by Disqus