Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Efficient walk/iterate along a string

by aquarium (Curate)
on Nov 23, 2010 at 02:56 UTC ( #873101=note: print w/ replies, xml ) Need Help??


in reply to Re: Efficient walk/iterate along a string
in thread Efficient walk/iterate along a string

i was also going to suggest that maybe refactoring may be possible if more context is known. index or straight regex can be used in a loop to traverse a string, don't know if more efficient or not. using index function with each letter (alphabetically) and incrementing the start index, could also be worth a try, but only if you're ok to traverse the string this way. there's also databases with bitmap indexes, which would allow very fast access to (pre-fetched cache) of particular sequences. but all depends on the semantics of your larger goal. a question that comes to mind, why is each protein sequence processed 20 times?

the hardest line to type correctly is: stty erase ^H


Comment on Re^2: Efficient walk/iterate along a string

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://873101]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (14)
As of 2015-07-07 21:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls