in reply to boolean calculation with very large data
Apart from that I agree with Corion that inversion lists are a good technique for this sort of problem.