中文

Morris-Pratt 和 Knuth-Morris-Pratt 算法的分支预测分析

数据结构与算法 2025-03-19 v1

摘要

我们通过计算机体系结构的视角分析经典的 Morris-Pratt 和 Knuth-Morris-Pratt 模式匹配算法,研究纳入简单分支预测机制对计算模型影响。假设固定模式和随机文本, 我们推导了这些算法产生的预测失误数量的精确估计值, 并使用局部预测器。我们的做法基于自动机理论和马尔可夫链,为对其他文本算法和更高级分支预测策略的理论分析提供了基础。

关键词

引用

@article{arxiv.2503.13694,
  title  = {Branch Prediction Analysis of Morris-Pratt and Knuth-Morris-Pratt Algorithms},
  author = {Cyril Nicaud and Carine Pivoteau and Stéphane Vialette},
  journal= {arXiv preprint arXiv:2503.13694},
  year   = {2025}
}

备注

22 pages, 15 figures