123456789101112131415161718192021222324252627282930 |
- package bloom
- import (
- "testing"
- "crypto/sha1"
- "crypto/sha256"
- )
- func BenchmarkJenkins(b *testing.B) {
- j := jenkinsHash{}
- for i := 0; i < b.N; i++ {
- j.ComputeHash([]byte{byte(i)})
- }
- }
- func BenchmarkSHA1(b *testing.B) {
- for i := 0; i < b.N; i++ {
- sha1.Sum([]byte{byte(i)})
- }
- }
- func BenchmarkSHA256(b *testing.B) {
- for i := 0; i < b.N; i++ {
- sha256.Sum256([]byte{byte(i)})
- }
- }
|