FastFilter / xor_singleheader

Header-only binary fuse and xor filter library
Apache License 2.0
348 stars 32 forks source link

Function binary_fuse_sort_and_remove_dup() will drop first unique value #53

Closed yangzq50 closed 8 months ago

yangzq50 commented 8 months ago

https://github.com/FastFilter/xor_singleheader/blob/1f7e18b2c1de0854e0da75d49a471d37c03e9e5f/include/binaryfusefilter.h#L20-L30

  1. In this function, why j starts from 0? For example, if keys[0] < keys[1] , this function will assign the value of keys[1] to keys[0] , and keys[0] will be no longer available.

  2. why return j+1; ?