however, during the membership check we start with
i = 239 .&. 7 = 7
meaning the first entrance into go starts with j = 14; the first
lookupAt tries to examine elements 14 and 15 of the hashtable
array, which are out-of-bounds.
The solution taken here is to ensure there is always at least one entry
of padding at the end of the hashtable array. This now passes the
quickcheck tests added previously.
FastSet carries a quite nice performance improvement in
microbenchmarks,
Otherwise consider the case of,
In this case,
l == 4
, therefore((5 * l)
div4) == 5
, thereforemask' == 7
, thereforei = 239 .&. 7 = 7
go
starts withj = 14
; the firstlookupAt
tries to examine elements 14 and 15 of the hashtable array, which are out-of-bounds.The solution taken here is to ensure there is always at least one entry of padding at the end of the hashtable array. This now passes the quickcheck tests added previously.
FastSet
carries a quite nice performance improvement in microbenchmarks,Fixes #103.