much nicer performance boost - 5.6s to 4.3s
better algorithm for computing set membership, actually
Cleaning up parts of that code a bit
eliminate one more parameter
Clean up dealing with stl headers