Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Which is the fastest pattern matching algorithm

Which is the fastest pattern matching algorithm

Scheduled Pinned Locked Moved C#
algorithmsregexquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tommazzo
    wrote on last edited by
    #1

    Hi! I'm looking for a way to find the position of a certain pattern within a string. On my search on the internet I've come accross various algorithms such as Knuth-Morris-Pratt and Boyer-Moore (just to name two). But which is the fastest?

    L 1 Reply Last reply
    0
    • T tommazzo

      Hi! I'm looking for a way to find the position of a certain pattern within a string. On my search on the internet I've come accross various algorithms such as Knuth-Morris-Pratt and Boyer-Moore (just to name two). But which is the fastest?

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      IIRC, BM is optimal for long input string + long search string. A common place to apply this is in a text editor's Find function. BM is realy simple to implement, and works well for most cases. xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots

      T 1 Reply Last reply
      0
      • L leppie

        IIRC, BM is optimal for long input string + long search string. A common place to apply this is in a text editor's Find function. BM is realy simple to implement, and works well for most cases. xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots

        T Offline
        T Offline
        tommazzo
        wrote on last edited by
        #3

        Thanks a lot! I'll give it a try.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups