4 ms·
Wow, that's almost exactly how I implemented it: var bucketSize = 8190; ... var bucketNumber = Math.floor(userId / bucketSize), bitInBucket =
by firefoxman1 15y ago
Wow, that's almost exactly how I implemented it:
var bucketSize = 8190;
...
var bucketNumber = Math.floor(userId / bucketSize),
bitInBucket = userId % bucketSize;
...correction on my last comment, looks like I use ~8 thousand bits per bucket, not 8 million.