Communication Dans Un Congrès Année : 2025

Branch Prediction Analysis of Morris-Pratt and Knuth-Morris-Pratt Algorithms

Résumé

We analyze the classical Morris-Pratt and Knuth-Morris-Pratt pattern matching algorithms through the lens of computer architecture, investigating the impact of incorporating a simple branch prediction mechanism into the model of computation. Assuming a fixed pattern and a random text, we derive precise estimates of the number of mispredictions these algorithms produce using local predictors. Our approach is based on automata theory and Markov chains, providing a foundation for the theoretical analysis of other text algorithms and more advanced branch prediction strategies.

Dates et versions

hal-05147509 , version 1 (07-07-2025)

Identifiants

Citer

Cyril Nicaud, Carine Pivoteau, Stéphane Vialette. Branch Prediction Analysis of Morris-Pratt and Knuth-Morris-Pratt Algorithms. CPM 2025, Jun 2025, Milano, Italy. pp.8:1-8:17, ⟨10.4230/LIPIcs.CPM.2025.8⟩. ⟨hal-05147509⟩
73 Consultations
0 Téléchargements

Altmetric

Partager

  • More