bits-and-blooms / bloom

Go package implementing Bloom filters, used by Milvus and Beego.
BSD 2-Clause "Simplified" License
2.44k stars 232 forks source link

reduce allocations in baseHashes() #28

Closed arussellsaw closed 8 years ago

arussellsaw commented 8 years ago

Hi!

thanks for making this project, it's been super easy to use 👍

while profiling some of my code i've noticed quite a few allocations coming from baseHashes() so figured i'd submit you a PR to sort things out.

the []uint64 was causing allocations, i also updated the fnv64Hash() to remove a type conversion and only index the data byte slice

Cheers!