in reply to Re: mismatching characters in dna sequence
in thread mismatching characters in dna sequence
When comparing many strings against many strings (not just two), performance actually might matter.
On my machine, your substr method takes 2.65 secs, while the XOR method I suggested above takes only 0.12 secs (for the same data), i.e. it's roughly 20 times as fast.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: mismatching characters in dna sequence
by prbndr (Acolyte) on Dec 30, 2011 at 04:44 UTC | |
by Eliya (Vicar) on Dec 30, 2011 at 05:00 UTC | |
by prbndr (Acolyte) on Dec 30, 2011 at 05:05 UTC | |
by Eliya (Vicar) on Dec 30, 2011 at 05:44 UTC | |
by prbndr (Acolyte) on Dec 30, 2011 at 05:54 UTC |