各种字符串匹配算法代码 速度比较

void BF (char *x, int m, char *y, int n);
void BF2(char *x, int m, char *y, int n); 
void AUT(char *x, int m, char *y, int n); 
void KR (char *x, int m, char *y, int n);
void NSN(char *x, int m, char *y, int n);
void QS (char *x, int m, char *y, int n);
void MP (char *x, int m, char *y, int n);
void SO (char *x, int m, char *y, int n);
速度测试结果
7990967 BF  [203]   1935868 BF  [ 47]
7990967 BF2 [281]   1935868 BF2 [125]
7990967 KR  [172]   1935868 KR  [ 62]
7990967 NSN [ 94]   1935868 NSN [ 32]
7990967 MP  [156]   1935868 MP  [ 46]
7990967 AUT [125]   1935868 AUT [ 47]
7990967 QS  [ 31]   1935868 QS  [ 16]
7990967 SO  [109]   1935868 SO  [ 47]
速度顺序 QS NSN SO AUT MP KR BF BF2
下载源码
posted @ 2013-04-17 12:04  1CM  阅读(476)  评论(0编辑  收藏  举报