Try getting rid of HashAndFreq to minimize allocations
alexklibisz opened this issue · 1 comments
alexklibisz commented
Background
Elastiknn currently uses a small pojo called HashAndFreq to represent a particular Hash and the number of times (i.e., frequency) that it should be repeated when searching the index for other vectors. The frequency is only ever > 1 for the Permutation LSH model. I would be curious what happens if I just replace HashAndFreq with a byte array. In other words, how expensive is the allocation of all these pojos. If it's a significant difference, maybe it's best to get rid of it.
Deliverables
- Quickly remove HashAndFreq
- Benchmark L2LshModel
- If it's a significant difference, consider removing the permutation LSH model, or implementing it in a way that doesn't require allocation of these pojos.
Related Issues
No response
alexklibisz commented