use binary operations for perf wins when there are lots of degenerate bases.  surprisingly, this is not any faster (compared with using python sets) for normal sequences, probably because operations for sets of size <=4 are fast