github.com/ekzhu/minhash-lsh@v0.0.0-20190924033628-faac2c6342f8/lsh_benchmark_test.go (about) 1 package minhashlsh 2 3 import ( 4 "strconv" 5 "testing" 6 ) 7 8 func Benchmark_Insert10000(b *testing.B) { 9 sigs := make([][]uint64, 10000) 10 for i := range sigs { 11 sigs[i] = randomSignature(64, int64(i)) 12 } 13 b.ResetTimer() 14 f := NewMinhashLSH16(64, 0.5, 10000) 15 for i := range sigs { 16 f.Add(strconv.Itoa(i), sigs[i]) 17 } 18 f.Index() 19 }