IStrand
interface, e.g.., a FastStrand
class.
On my desktop machine, the SlowStrand
implementation
ran in 1,337 seconds on the hugefasta.txt data file.
When I created a FastStrand
implementation whose
merge
method used regionMatches
instead
if the code in SlowStrand
, but whose implementation was
otherwise the same (e.g., contains
was the same), the time
dropped to just under 14 seconds.
When I made the other changes suggested, e.g., incorporating containment
as part of merge
, the time dropped to under 5 seconds.