in reply to Efficient walk/iterate along a string
I think you may have simplified just a bit too much. Since you focused in on character-by-character iteration, you've pretty much constrained possible solutions into that mold. Depending on what you're doing, there may be methods that are significantly faster.
Are you looking for particular clusters to alter? If so, you may find index to be faster to locate the clusters of interest.
You mention that each protein is used 20 times. But that's for one run of your program, right? Are you going to use the program multiple times? If you take number of runs into account, and number of uses overall of the proteins, it may be possible that you can build a database of protein substrings and then just look them up in the database rather than having to dig for them sequentially.
If you can give us a little more information about the operations you're performing, perhaps we can be a little more helpful.
...roboticus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Efficient walk/iterate along a string
by aquarium (Curate) on Nov 23, 2010 at 02:56 UTC |