Adding fast path for graph size 5.  Adding an impl to work with masks to do set membership instead of sets