BitSets and Metrics
After reading an article on Fast, easy, realtime metrics using Redis bitmaps and seeing they used a Java implementation of BitSet, I really wanted a native JavaScript implementation.
Looking at what they did for Java it wasn't too difficult to implement this for JavaScript. The result is up on GitHub.
Some example JavaScript code:
var bs = new BitSet();
for(var n = 0; n < 12; n++) {
bs.set(n);
}
console.dir(bs);
