Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6639453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:33:21+00:00 2026-05-25T23:33:21+00:00

First I know very little about algorithms, so bear with me. As I understand

  • 0

First I know very little about algorithms, so bear with me.

As I understand it, the Boyer Moore algorithm is fastest with a long key. So what if I have a very shor key (example 10 chars), and alot of text to search (over 10,000 chars).
Would Boyer Moore be the best search algorithm for this scenario?

If not what would be?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:33:22+00:00Added an answer on May 25, 2026 at 11:33 pm

    According to String searching algorithm, “The Boyer–Moore string search algorithm has been the standard benchmark for the practical string search literature.” It’s not always the fastest, but in general it’s the way to go.

    Knuth-Morris-Pratt and Boyer-Moore are very close in running time when you’re talking about a small text buffer like 10,000 characters. Even a naive string search will be blindingly fast on a 10K buffer when run on a modern computer. I suspect you’ll find that the difference between the KMP and Boyer-Moore two searching for a 10-character string in a 10,000 character buffer will be on the order of nanoseconds.

    The best search algorithm in this scenario? That’s going to depend on how often you need to call it. If it’s something that gets called a few times a second (at most), I’d probably write a naive search and leave it at that. The difference between Boyer-Moore and naive search on that small buffer would be insignificant compared to the running time of your program, and your optimization effort would be better spent somewhere else. If I had to call it hundreds or thousands of times a second, I’d take the time to write an optimized Boyer-Moore search.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First question on here so please be nice :) I know very little about
I just started thinking about creating/customizing a web crawler today, and know very little
First of all, I know how to build a Java application. But I have
First, yes I know about this question , but I'm looking for a bit
First off, I know next to nothing about language theory, and I barely know
I don't know very well about RAM and HDD architecture, or how electronics deals
First, a little background : I have written a little application in python with
First I'm not mad, because I use MVVM in WinForms-) I know about MVP
You know the one I am talking about. We have all been there at
Background: I have extensive experience in web applications, but I have very little or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.