HyperLogLog optimizations and benchmark