Efficient string matching algorithm

后端 未结 14 798
Happy的楠姐
Happy的楠姐 2020-12-16 07:13

I\'m trying to build an efficient string matching algorithm. This will execute in a high-volume environment, so performance is critical.

Here are my requirements:

14条回答
  •  时光说笑
    2020-12-16 08:04

    I guess I am tempted to answer your question with another one: what are you doing that you believe your bottleneck is some string matching above and beyond simmple string-compare? surely something else is listed higher up on your performance profiling?

    I would use the obvious string compare tests first that'll be right 90% of the time and if they fail then fallback to a regex

提交回复
热议问题