4 ms·
I'm sure you thought of this, but what are the drawbacks to simply INCR/DECR some counters when an object changes state?
by teej 9y ago
I'm sure you thought of this, but what are the drawbacks to simply INCR/DECR some counters when an object changes state?
- pjungwir 9y agoIndeed after ruling out HLL I decided that was the way to go. :-) I guess an HLL is more appropriate when you can't so easily keep track of which items have already been added to each set. For example if you were counting unique visitors per day, you would have a lot of sets (one per day), so you wouldn't want to store n visitor IDs for every day. But when an item can only be in one set at a time (and the sets are finite) incr/decr is possible so you might as well go with it.