Closed f2prateek closed 6 years ago
The public API currently looks like this:
package fasthash func BenchmarkHashString32(b *testing.B, name string, reference func(string) uint32, algorithm func(string) uint32) func BenchmarkHashString64(b *testing.B, name string, reference func(string) uint64, algorithm func(string) uint64) func HashString32(f func() hash.Hash32) func(string) uint32 func HashString64(f func() hash.Hash64) func(string) uint64 func HashUint32(f func() hash.Hash32) func(uint32) uint32 func HashUint64(f func() hash.Hash64) func(uint64) uint64 func TestHashString32(t *testing.T, name string, reference func(string) uint32, algorithm func(string) uint32) func TestHashString64(t *testing.T, name string, reference func(string) uint64, algorithm func(string) uint64) func TestHashUint32(t *testing.T, name string, reference func(uint32) uint32, algorithm func(uint32) uint32) func TestHashUint64(t *testing.T, name string, reference func(uint64) uint64, algorithm func(uint64) uint64)
I think we should split the testing ones into a subpackage (like nettest) and simplify the core package a bit.
nettest
package fasthash func HashString32(f func() hash.Hash32) func(string) uint32 func HashString64(f func() hash.Hash64) func(string) uint64 func HashUint32(f func() hash.Hash32) func(uint32) uint32 func HashUint64(f func() hash.Hash64) func(uint64) uint64
package fasthashtest func BenchmarkHashString32(b *testing.B, name string, reference func(string) uint32, algorithm func(string) uint32) func BenchmarkHashString64(b *testing.B, name string, reference func(string) uint64, algorithm func(string) uint64) func TestHashString32(t *testing.T, name string, reference func(string) uint32, algorithm func(string) uint32) func TestHashString64(t *testing.T, name string, reference func(string) uint64, algorithm func(string) uint64) func TestHashUint32(t *testing.T, name string, reference func(uint32) uint32, algorithm func(uint32) uint32) func TestHashUint64(t *testing.T, name string, reference func(uint64) uint64, algorithm func(uint64) uint64)
Adding a fastashtest sub package is a good idea 👍
fastashtest
Are you taking it?
Yep I can do it!
The public API currently looks like this:
I think we should split the testing ones into a subpackage (like
nettest
) and simplify the core package a bit.