A transformation for optimizing string-matching algorithms for long patterns

5Citations
Citations of this article
8Readers
Mendeley users who have this article in their library.

Abstract

String-matching algorithms search for all the locations where some pattern string matches within another input string. These algorithms make extensive use of character-wise comparisons, which may be optimized in order to achieve better performance of the entire algorithm. In this article, we describe a code transformation aimed at improving the performance of the string-matching algorithms that incorporate comparison of buffers of characters. The suggested transformation optimizes the buffer comparison operation whose multiple invocations are required by the string-matching algorithms. The transformation incorporates a template, which is based on the notion of dynamic guards used in conjunction with the word-sized comparisons. The template when instantiated produces code that may perform the buffer comparison operation more efficiently than the original code. The suggested optimization approach is portable and results in an efficient execution of the string-matching code for different sizes of the input pattern. We perform experiments with icc and GCC compilers on the Intel Core i7 processor-based system. Using the proposed code transformation applied to a large number of string-matching algorithms, the experimentation results show that the optimized string-matching code is able to achieve a significant speed-up over the original code.

Cite

CITATION STYLE

APA

Khan, M. A. (2016). A transformation for optimizing string-matching algorithms for long patterns. Computer Journal, 59(12), 1749–1759. https://doi.org/10.1093/comjnl/bxw023

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free