ocaml-batteries-team/batteries-included — pull request #246 by gildor478 (2012-02-16 21:19:26+00:00)
Title: Optimize bitset

Provide an entirely new implementation of BatBitSet. This new version has the advantage to be more fully tested and benchmarked. It is also more simple and use less black (Obj.) magic.

Performance improvement varies widely depending on the architecture. But overall general operations gains a 30% boost (e.g. 3.5ms for bitset.general to 2.5ms considering that array.general is at 2.2ms).

Various implementation has been tested to reach this result, including inlining of String.unsafe* operation and use of integer arrays.