Good way to hash a float vector?

后端 未结 7 870
刺人心
刺人心 2020-12-07 21:13

I am well aware of all the problems involved in comparing floats. This is exactly the reason for this question.
I\'m looking to create a fast hash table for values that

7条回答
  •  攒了一身酷
    2020-12-07 21:28

    Do you need it to be a fast hash table or would a tree structure do?

    It seems to me that it would be easier to look up matching floats in a search tree of some sort. A B-Tree minimizes the number of cache misses, assuming that you choose the right node size. That ought to make it pretty fast in practice.

提交回复
热议问题