Use presieve/test for large segment bases.  Much faster and less memory.