Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: counting the number of 16384 pattern matches in a large DNA sequence

by BrowserUk (Patriarch)
on Jun 14, 2012 at 18:51 UTC ( [id://976278]=note: print w/replies, xml ) Need Help??


in reply to Re^2: counting the number of 16384 pattern matches in a large DNA sequence
in thread counting the number of 16384 pattern matches in a large DNA sequence

Just as a matter of curiosity, have you ever come across a case in which there was a benefit from studying a string even once?

Yes. But it was

  • a while ago on much slower hardware than I now run.

    Boyer-Moore worked best in the days before the chip manufacturers had built string search algorithms into microcode; and before the advent of deeply pipelined architectures with branch predictions, when branching had a proportionally significantly greater impact on throughput than with modern hardware.

  • the needle being search for contained a character that was very rare in the haystack being searched.

    This allows the algorithm to trade intelligence for brute force.

    With modern processors that overlap fetches and branching stalls with other parts of the opcodes, the benefits are greatly curtailed.

I tried to look up a old post of mine that benchmarked study having a beneficial effect, but couldn't find it.

I also tried to replicate my memory of what I was doing back then, but cannot reproduce it. Whether that's because my memory is bad, or my modern processor negates the benefits I'm not totally sure, but I suspect the latter.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

  • Comment on Re^3: counting the number of 16384 pattern matches in a large DNA sequence

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found