By original I mean the code described on wikipedia here, and in the papers in the notes 1 and 2 on that page.
- On wiki there is this line
bit = bmp & (1 << ((hashcode >> level) & 0x1F))
which is imho incorrect, as theand bmp
is an error here and redundant with theand
in theiinsert
function. - In the paper they talk about a "32-bit hashcode space". I use OCaml's native
int
, which are either 31 or 63 bit long depending on the platform. This changes nothing in the logic, only slightly changes the maximum practical depth.